I have a make file with a rule that takes all of the .o files and makes an executable.
The object files are stored in a directory under the directory where the make file is stored ie linuxdebug.
I am attempting to use cd ./linuxdebug in my rule. Then I call g++ x.o manprg, the compiler can not find x.o file.
if i do g++ ./linuxdebug/x.o manprg is works. Is there a way to do this without specifying the direectory in the g++ command line?
Is there another approach to do this except using g++ ./linuxdebug/x.o to compile the object files into my executable?
Start Free Trial