开发者

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`
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜