Linker error when trying to mock class #3938
Unanswered
adriangarro
asked this question in
Community Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
I'm not able to run the mocked based unit test written on line 57 located at this file on my repository:
https://github.com/adriangarro/cplusplus_unit_testing/blob/main/Google_tests/AuthorizationTest.cpp
Since I'm getting this linker error:
Anyone know if I need to some change on the line 4 of my test CMakeList.txt?:
https://github.com/adriangarro/cplusplus_unit_testing/blob/main/Google_tests/CMakeLists.txt
Does the bug persist in the most recent commit?
Using latest googletest sources from June 27, 2022
What operating system and version are you using?
macOS Big Sur 11.6.6
What compiler and version are you using?
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
What build system are you using?
I'm using deafult CLion setup described on:
https://www.jetbrains.com/help/clion/unit-testing-tutorial.html#adding-framework
I appreciate any possible help :)
Beta Was this translation helpful? Give feedback.
All reactions