Recursivly make .O files with g++?
I have my main.cpp file, and in that folder is another folder called src, and in that folder are more folders etc... How could I compile this easily with g++? I do not want to make a make f开发者_如何学Goile at this time because I'm still working on my project but I want to test in in Linux and OSX.
Thanks
g++
doesn't manage your build process. It follows the unix philosophy of doing one thing and doing it well. This doesn't include build management.
Make a Makefile. Its what they are made for.
You could do it the right way, with a Makefile, or by making a list every time you build, something like:
g++ -Wall -o myapp `find . -name \*.cpp`
精彩评论