I am developing a C ++ application under Ubuntu 10.10 using g ++ and automake. For this program, I have two cpp files (main.cpp and forward.cpp, the last one is a test class) and forward.h; I also have the following make file:
main: \ forward.o g++ -fPIC -g -Wall -D_REENTRANT -fno-exceptions -I/usr/local/Aria/include/ -L/usr/local/Aria/lib -lAria -lpthread -ldl -lrt \ -o simple_controller \ main.cpp \ forward.o %.o : %.cpp g++ -c -g -Wall -D_REENTRANT -fno-exceptions -I/usr/local/Aria/include/ $< -o $@ clean: rm -fv *.o rm -fv */*.o
When I copy all of these four files to the same directory and call "make" from the command line (bash), then g ++ is called and my program will compile correctly.
Ok, now I wanted to do the same in Eclipse. So I created a new unmanaged C ++ project under Eclipse, so that I can provide my own makefile (the same as above). Unfortunately, when I now use the Create All option in Eclipse, I can see the following console output:
make make: *** No rule to make target `forward.o', needed by `main'. Stop.
Since I'm new to C ++ development on Linux using g ++ and make files, I really don't understand the problem. I thought that everything that was needed to compile my application was written in a make file, since it works fine from the command line. But it seems like I cannot copy the same makefile 1: 1 to an Eclipse project.
Any ideas on what I don't see here?
Thanks in advance for your help!
source share