Open
Description
My problem
I am building nomad on macOS for MATLAB. I hence ran
cmake -DBUILD_INTERFACE_MATLAB=ON -DMatlab_ROOT_DIR=/Applications/MATLAB_R2022b.app -S . -B build/release
This completed successfully. However, when building the library with
cmake --build build/release
I get the following error.
[ 99%] Linking CXX shared library nomadOpt.mexmaci64
Undefined symbols for architecture x86_64:
"_utIsInterruptPending", referenced from:
matlabEval::eval_x(NOMAD_4_2::EvalPoint&, NOMAD_4_2::Double const&, bool&) const in nomadmex.cpp.o
"_utSetInterruptPending", referenced from:
matlabEval::eval_x(NOMAD_4_2::EvalPoint&, NOMAD_4_2::Double const&, bool&) const in nomadmex.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [interfaces/Matlab_MEX/nomadOpt.mexmaci64] Error 1
make[1]: *** [interfaces/Matlab_MEX/CMakeFiles/nomadOpt.dir/all] Error 2
make: *** [all] Error 2
I set up mex to run with clang
.
My architecture
- macOS: version 12.6 (Monterey, x86_64)
- clang: version 14.0.0 (clang-1400.0.29.102)
- MATLAB: version 9.13.0.2049777 (R2022b)
- CMake: version 3.24.1
Do you have any idea how I can fix my problem? Thank you very much for your help 😁