Issues install Clarabel in MATLAB

Issues installing optional Clarabel for MATLAB

I enconunter an issue when install Clarabel in MATLAB, using acados_install_windows
since inside CMakeLists, cp is not available in Win32

If I replace cp with -E copy in CMakeLists and also change install for different operating systems as
if(APPLE) install(FILES "${CLARABEL_C_OUTPUT_DIR}/libclarabel_c.dylib" DESTINATION "lib") elseif(UNIX) install(FILES "${CLARABEL_C_OUTPUT_DIR}/libclarabel_c.so" DESTINATION "lib") elseif(WIN32) install(FILES "${CLARABEL_C_OUTPUT_DIR}/clarabel_c.dll.lib" DESTINATION "lib") install(FILES "${CLARABEL_C_OUTPUT_DIR}/clarabel_c.lib" DESTINATION "lib") endif()

it will pass compile but still fail in MATLAB when actually running an example, giving a
Error using [mex](matlab:matlab.lang.internal.introspective.errorDocCallback('mex'))
In function 'std::sys::pal::windows::handle::Handle::synchronous_write': /rustc/01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf/library\std\src\sys\pal\windows/handle.rs:314: undefined reference to 'NtWriteFile' /rustc/01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf/library\std\src\sys\pal\windows/handle.rs:342: undefined reference to 'RtlNtStatusToDosError' collect2.exe: error: ld returned 1 exit status

I never programme with C before so not really sure what to do. But I do want to make Clarabel work since I had some experience with that solver with a different transcription method, hence it will be nice to have a comparison.

This is kind of expected.
Note that the clarabel interfaces uses this C++ wrapper, which in turn also does not seem to support Windows.

1 Like