Please do not close this as a duplicate. I've done my research both online and on Stackoverflow. I cannot find a solution to my problem, which is that the command line complains as follows:
make: *** No targets specified and no makefile found. Stop.
What I'm trying to do
1) Using C++11 to write three code files: a header file, a cpp file, and a main.cpp file
2) Writing a Makefile.txt to compile all of these and create an executable
What I've done
1) Created a valid header, cpp, and main.cpp file. All of these compile properly if I do so manually
2) Installed make.exe (GnuWin32) and added the directory of make.exe to my PATH environment variable to ensure it can be invoked from the command line
3) Written the following Makefile:
all: Project
Project: main.o ShuntingYard.o
g++ -std=c++11 main.o ShuntingYard.o -o Project
main.o: Main.cpp ShuntingYard.h
g++ -c -std=c++11 Main.cpp
ShuntingYard.o: ShuntingYard.cpp ShuntingYard.h
g++ -c -std=c++11 ShuntingYard.cpp
Here is a confirmation that the above files exist (I couldn't upload an image to SO for some reason).
What I'm doing in the command line
I'm using cmd.exe, and I've navigated to the corresponding directory where all the files are located. I type "make", and I get the following error:
make: *** No targets specified and no makefile found. Stop.
This is driving me nuts...any idea what I've done wrong? I tried restarting cmd.exe, but that didn't help.
Aucun commentaire:
Enregistrer un commentaire