long story: divide one design solution by 3, use the .lib old exe , add the projects to the appropriate paths, update the linker, and you are good to go.
AE Drew's answer helped solve my problem, but I want to put a more complete solution to the question if anyone from Google, especially if they are looking for a simple breakdown from perspective.
If you had only one project in your solution that built .exe for you, CATCH will not work: your solution needs 3 projects (as far as I know) in order to be able to check your code.
Source_project , The main code project (in which the source code for your application is located)
Test_project , a test Test_project project (which displays REQUIRES tags as indicated in the above question)
Main_project , a project in which you really call and run code from source codebase.
To convert the original solution for one project to something that you can use in both tests and to run correctly, you will need to build .lib or a .dll so that other projects (including other people's projects) can use the same code. By changing this answer , all that is required is
right-click the project in Solution Explorer and select> Properties .... Under Configuration Properties โ General Settings a> called Configuration Type. If you change it to [Static Library> (.lib)], the project will generate [ .lib ] when it is created.
And then in the third Main_project project, where you have the barebone setting from the Win32 Console application, which contains only a file that looks something like:
#include "stdafx.h" #include "HEADER_FROM_FIRST_PROJECT.h" int _tmain(int argc, _TCHAR* argv[]) { METHOD_FROM_FIRST_PROJECT(); return 0; }
where you import the header file from Source_project , the first project that we (the one that used to be exe but now builds on lib ). But which is not going to start yet, you need to add the Source_project directory to this additional directory projects by right-clicking the project in Solution Explorer under Properties> Configuration Properties> C / C ++> General> Additional Include Directories, add the Source_project folder to the list . This will allow the #include lines to automatically look for this directory for the corresponding files, which saves you from having to write ../source_project/HEADER_FROM_FIRST_PROJECT.h .
Finally, the last step is to make sure that the linker can actually find the objects you are trying to include. And since we are building .lib , we can do this quite simply. In the same settings dialog box as before this Project Properties dialog box, we will go to the settings Properties> Linker> Input> Additional Dependencies and add the relative path to source_project.lib , which will look something like ../Debug/source_project.lib .
Note that if you have .dll that are in the old exe project, this will need to be moved to the new Main_project .
Also note that this is all very new to me, and some of these terms and information are error related.