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.
The issue here is that you didn't include MyMultiplier.h/cpp in the actual test project.
Add it to the project file (right-click, add existing item and navigate to the files).
Adding dependencies for .lib files is a manual step in Visual Studio.
More information can be found here: http://msdn.microsoft.com/en-CA/library/ba1z7822.aspx
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.
The root cause is the project type is not set correctly.
In this example, there are three projects:
The root cause is "FirstGoogleTest" project's configuration Type was set to .exe, which is the same as the ULT project. so the ult test cannot get the externals from "FirstGoogleTest". After changing "FirstGoogleTest" configuration Type to Static library (.lib). the solution can be compiled correctly and the ULT runs fine.