I want to unit test my C++ project with Visual Studio. After adding the folders from my project as include path to my test project, I get linker errors when trying to compil
I believe the chosen answer is not correct. Tests typically should be run in their environment; therefore, they should not access the implementation (.cpp)
When you create a separate Test Project on Visual Studio (VS 2017) you need to create a reference to the project you want to test (right-click test project -> Add -> Reference -> tick projects): Add a reference
If you see some linker errors, right-click from the Unit test project: Project->Linker->Input->Additional Dependencies->Edit then add the path to your .obj files. You could try something like "$(SolutionDir)ConsoleApplication1\$(IntDir)*.obj" where ConsoleApplication1 is the target project name.
Path to .obj
Initially, I only wanted to put a comment on Cornelis' post, but I couldn't.