Relative Content

Tag Archive for c++linker-errorsgoogletest

Building google test as a DLL in Visual Studio 2022 linking errors

I just cloned https://github.com/google/googletest, created a new visual studio (2022 professional) DLL project and copied directories https://github.com/google/googletest/tree/main/googletest/include/ and https://github.com/google/googletest/tree/main/googletest/src into the project folder and added $(ProjectDir);$(ProjectDir)include to the project’s “Properties –> C++ –> Additional Include Directories” and then replaced all #include "gtest/ with #include "../include/gtest/ and all #include "src/ with #include "../src/ and built the project. Compilation went fine but linking did not as I had roughly 400 linking errors :