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.
Asked
Active
Viewed 798 times
0
-
2You probably want to use a build system, e.g. GNU make. – πάντα ῥεῖ Dec 08 '21 at 16:34
1 Answers
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/
-
That is the solution I knew about. But thanks for the quick answer. – Kabajat2008 Dec 08 '21 at 16:38
-
-