Closed endysonx closed 4 months ago
When build in MacOS sonoma Version 14.2.1 (23C71), I encounted a ld problem :
ld: Undefined symbols: ndThreadYield(), referenced from: void ndThreadPool::ParallelExecute<ndFunction<ndDynamicsUpdateAvx2::DetermineSleepStates()::$_0>>(ndFunction<ndDynamicsUpdateAvx2::DetermineSleepStates()::$_0> const&) in ndDynamicsUpdateAvx2.cpp.o void ndThreadPool:: ...
Which is caused by Apple clang try to link all when compiling. Modifying the following code in the newton-4.00/CMakeLists.txt file fixed the problem.
if(APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fms-extensions")
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup") endif(APPLE)
alright done. sorry for the long delay, I was not available. Thanks
When build in MacOS sonoma Version 14.2.1 (23C71), I encounted a ld problem :
ld: Undefined symbols: ndThreadYield(), referenced from: void ndThreadPool::ParallelExecute<ndFunction<ndDynamicsUpdateAvx2::DetermineSleepStates()::$_0>>(ndFunction<ndDynamicsUpdateAvx2::DetermineSleepStates()::$_0> const&) in ndDynamicsUpdateAvx2.cpp.o void ndThreadPool:: ...
Which is caused by Apple clang try to link all when compiling. Modifying the following code in the newton-4.00/CMakeLists.txt file fixed the problem.
if(APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fms-extensions")
Add this line
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup") endif(APPLE)