Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 21994

How to build/compile object from a folder by using Makefile?

$
0
0

I am trying to create an executable and objects from makefile. Objects and sources are in different folder.

My tree is :

./obj
./src/main.cpp
Makefile

All i want is just to make objects in obj/ folder and to compile with these objects

That is what I got so far :

make: *** No rule to make target 'obj/src/main.o', needed by 'a.out'.  Stop.

enter image description here


Viewing all articles
Browse latest Browse all 21994

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>