-
-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ld: unknown option: --copy-dt-needed-entries #264
Comments
I was unfamiliar with this option so I looked it up:
I assume that I tried removing the flag which failed with undefined symbols at link time; here are the first few:
This is because googletest in my distribution provides only static libraries which is because of google/googletest#3442. Also linking with the gtest library fixed the problem for me: --- CMakeLists.txt.orig 2023-05-13 16:46:25.000000000 -0500
+++ CMakeLists.txt 2023-06-19 01:30:19.000000000 -0500
@@ -179,7 +179,6 @@
option(EXTERNAL_GTEST "Use external GoogleTest instead of fetching from GitHub" OFF)
if (EXTERNAL_GTEST)
- link_libraries("-Wl,--copy-dt-needed-entries")
else()
include(FetchContent)
FetchContent_Declare(
@@ -217,6 +217,7 @@
target_link_libraries(
${TEST_NAME}
${PROJECT_NAME}
+ gtest
gtest_main
)
I only tested on macOS 12. I tested both with and without Possibly the order of |
Hi! I'm trying to build litehtml 0.7 on macOS 12. I've used the cmake flag
-DEXTERNAL_GTEST=ON
and the error I get is:The text was updated successfully, but these errors were encountered: