0

I want to know if there is a way to compile a lot of *.cpp files at once with a g++ command. The way I know to do it is to just type the name of every file manually. That gets a little complicated when I have a big project. I am using g++ version 6.3.0 on windows.

1 Answers1

0

The answer to your quesiton can be found here Using G++ to compile multiple .cpp and .h files.

To put it simple the solution would be as explained in that post.

g++ main.cpp other.cpp etc.cpp

Also to automate that kind of stuff i would suggest that you look into Makefiles. A simple guide can be found here: https://www.softwaretestinghelp.com/cpp-makefile-tutorial/