Unable to compile GTests with MSVS and Clang; multiple undefined symbol...
#4392
-
I am unable to compile a project using GoogleTest with MSVS and Clang; results in multiple
Any help would be extremely appreciated. Environment:
Settings
Code:cArray_tests.cpp
main.cpp
Output (building in MSVS)
Attempts to remedy:
Again, thank you for reading this far, and for your time and efforts on my behalf. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I fixed it for myself. Like any good programmer I will post the solution to save any future programmers aggravation. Did not work:
Worked
https://google.github.io/googletest/quickstart-cmake.html got me here...
|
Beta Was this translation helpful? Give feedback.
I fixed it for myself. Like any good programmer I will post the solution to save any future programmers aggravation.
Did not work:
Building gtest and gmock with MSVS and using just about every possible combination of compilers, compiler options, MSVS options
Building gtest and gmock separately using CMake
Worked
CMakeList.txt
and then in cmd:cmake -S . -B build && cmake --build build && cd build && ctest
CMakeList.txt
(root CMakeList)