I suggest you create one project containing all your files (provided that each of them has its own main function), and inside this project create an “Assembly Configuration" for each program, using:
Project> Properties> C / C ++ Build> Configuration> Management ...> New
To avoid multiple definitions of main in each build configuration, you will have to exclude each cpp file from the "Build Configuration" in which it does not belong. To do this, in the "Navigator" view:
Right-click the cpp> Properties> C / C ++ Build file and select the "Exclude from assembly" check box for each assembly configuration that the source file does not belong to.
When everything compiles fine, you can run or debug each program separately in Eclipse, choosing the appropriate build configuration.
Further information in this answer:
What files belong to the build target in a managed CDT build?
Hope this helps!
Francois
source share