Google Test: error LNK2019: unresolved external symbol with Visual Studio 2013

前端 未结 4 2299
忘了有多久
忘了有多久 2021-02-14 10:53

I\'m trying to get my first ever unit test with Google Test framework + Visual Studio 2013.However I\'m hitting the below error and can\'t understand why.

4条回答
  •  感情败类
    2021-02-14 11:13

    I had the same problem, and the easiest solution when you want a standalone google test is to link gtest_main as well as gtest. You can set your Visual Studio project as Executable and then link with gtest_main and gtest.

提交回复
热议问题