简体   繁体   中英

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 file 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.

您可以使用Makefile或通过在每次构建时列出一个列表来正确执行此操作,例如:

g++ -Wall -o myapp `find . -name \*.cpp`

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM