Page 1 of 1

Unable to run multiple independent c++ files having main functions

Posted: Mon Oct 01, 2018 2:36 pm
by utkalsinha
I have a project structure as follows:

Myworkspace:
Project1/src/main1.cpp
project2/src/main2.cpp
project2/src/main3.cpp


main1.cpp, main2.cpp, and main3.cpp are completely independent files. However, when I do build and run (Ctrl + f5) only main1.cpp runs. How to make each of the independently runnable?

I don't intend to build a full typical projects. I participate in coding contests, and just want to keep each file in an organized manner.

I find codelite is very good, light weight, and fast. So I want to use it. Unfortunately, I am not able to compile and run other files if any single main file is present.


Please help.

Re: Unable to run multiple independent c++ files having main functions

Posted: Tue Oct 02, 2018 1:46 am
by eranif
You can create an empty project that depends on all the other projects, building this will build them all.
Or make one of the projects depends on the rest