make files

I need to use a makefile for a C++ course Im taking Ive written it but it is throwing a The system cannot find the file specified error but the file it says it cant find is in the directory with the makefile

1
2
3
4
5
6
7
8
blackjack.out : deck.o
	g++ -o blackjack.out deck.o

deck.o: deck.cpp accounts.h deck.h game.h hands.h
	g++ -c deck.cpp

clean:
	&nbps rm*.o deck.out


the information it gives me is
1
2
3
4
g++ -c deck.cpp
process_begin: CreateProcess<NULL, g++ -c deck.cpp, ...> failed
make <e=2>: The system cannot find the file specified.
makeL *** [deck.o] Error 2


sadly The tutorials I have found thus far online regarding makefiles are designed for much more complex programs for this and leave me quite confused. Ive read over the code many times looking for errors or anything the only thing I notice is that in the error code there is a comma after deck.cpp but not in my file. Any help would be appreciated.
Hey friends... wht is wrong with your code is unknown.

But here's a little help for makefile. Hope it will help you...
http://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/

It gives nice tuts abt Makefile... Have fun...
For more guidance of makefile..


Is g++.exe and/or rm.exe in PATH or working directory ? I don't think it is.
Last edited on
well modoran g++ is in the Path for my OS (windows 7 64-bit). as for those sites I create the files they want compiled then copy their code for the makefile and I still get the error system can not find the file specified.
The make program is broken on Windows -- you need to be sure to install MinGW/MSYS properly such that the properly-patched make is used. By default it is named something weird, like "mingw32-make.exe". When you set up your shell, make a macro for "make" that invokes the correct MinGW make.
Last edited on
Topic archived. No new replies allowed.