how to compile cpp program using g++

Hi everyone, I have so many cpp programs. I used makefile to link all object files together. Inside so many programs, it has one program that i wanna run now. How to run it? How to make executable file for my program? thanks
I'm not sure I understand you correctly; you have compiled & linked several programs together into one big program? If you could elaborate more, that would be very helpful.
closed account (Dy7SLyTq)
g++ -o *.cpp *
In the terminal, navigate to the directory containing your files with cd. If your .cpp file was called test.cpp and you wanted the executable to be called test, you'd enter the following command into terminal:
g++ test.cpp -o test

To run your program, enter
Topic archived. No new replies allowed.