Encountering Issues Building for Apple M1 #4885
Unanswered
jstr045329
asked this question in
Community Help
Replies: 1 comment
-
|
Looks like the GoogleTest library isn't being linked. The linker is trying to create your executable with only GoogleTest needs You can probably try to integrate GoogleTest into your CMake project with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm new to gtest so sorry if this question is dumb.
I think my project is building successfully, but I keep getting this error:
/Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/cmake --build /project/dir/MyProject/cmake-build-debug --target all -j 6
[1/9] Linking CXX executable MyProject
FAILED: MyProject
: && /usr/bin/c++ -g -arch arm64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/MyProject.dir/googletest/googletest/src/gtest_main.cc.o -o MyProject && :
Undefined symbols for architecture arm64:
"testing::InitGoogleTest(int*, char**)", referenced from:
_main in gtest_main.cc.o
"testing::UnitTest::GetInstance()", referenced from:
RUN_ALL_TESTS() in gtest_main.cc.o
Running on MacOS Tahoe
IDE is CLion 2025.2
Beta Was this translation helpful? Give feedback.
All reactions