My background is Linux and traditional makefiles. I have a project where the makefile builds several dozen executables I can then run to perform tests against the library being developed. This library is now ported to Windows.
My question: In Microsoft Visual C++, do I have to create a new project for every individual test .exe
file? Or is there a way to create 1 project that will easily build all of the .exe files? E.g., test001.cpp
becomes test001.exe
, test002.cpp
becomes test002.exe
, etc.
I'm using Microsoft Visual C++ 2010 Express. Right now what I do is click on File->Add->New Project...->Win32 Console Application->...
for every test executable. But it would be nicer if all these test files could be built without a new project for each one.
You need to have one project per executable, but you can have multiple projects per Visual Studio "solution".
When you build a solution, all of its projects get built. If you need the projects to be built in a specific order within the solution, you can easily set up dependencies.