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

CodeLite installation/troubleshooting forum
utkalsinha
CodeLite Curious
Posts: 1
Joined: Mon Oct 01, 2018 1:07 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post 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.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post 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
Make sure you have read the HOW TO POST thread
Post Reply