I have a Main Project with lots of files including a main() which drives everything.
I have a stand-alone Parser Project with a main(), but its other files are intended to be used by the Main Project. This main() is just used for testing this project by itself.
I have a second Parser project with a main() that needs files from the Main Project and has files needed by the main project. The main() is used for testing this project by itself.
I have a fourth project that consists solely of unit tests. It requires files from the other three projects.
I am lost on a convenient way to structure my solution to avoid clashes with multiple mains.
I like being able to test the two Parser Projects separately instead of having one big main that knows how to do everything.
I’ve tried excluding the main .obj files in the project property pages, but that only seems to care about libraries.
The unit tests require all the projects to be built first, guaranteeing clashes.
This really doesn’t feel like a far-fetched example…what is the point of multiple projects in a solution if they cant co-exist and interact?
TIA
PBL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.