Linker error while unit testing with Visual Studio C++

后端 未结 3 1312
花落未央
花落未央 2021-01-14 06:23

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

3条回答
  •  温柔的废话
    2021-01-14 07:11

    https://www.codeproject.com/Tips/1085171/How-To-Do-Unit-Testing-with-Cplusplus-in-Visual-St

    I found there that you have to add your .h and .cpp files as existing files also to the test project. That is left out on the official documentation or I missed it.

    Now it works!

提交回复
热议问题