Problems with Make

B

Brian

Hello All,

I'm new to creating make files, so please help me out. I am using g++
to compile. I'm getting a weird error, if someone could help me out,
I'd appreciate it. I have a templated class that's included from
main.cpp, so I understand I don't have to compile them, just main.cpp.

Here's my makefile:

main: main.o
g++ -o main main.o

main.o: main.cpp templatedClass.h templatedClass.cpp
g++ -c main.cpp


The error that I'm getting is:

. Stop.n't know how to make main.o

If someone has seen this or sees an erro in my make, please help me out.
If I run the g++ commands from the prompt, everything works fine.

Thanks.

Brian.
 
V

Victor Bazarov

Brian said:
I'm new to creating make files, so please help me out.[...]

Makefiles are off-topic here. Please visit gnu.utils or
gnu.utils.help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top