MEX cannot find library 'acados'

Hi there! :wave:

Just followed the instructions for the installation process of acados ( Installation — acados documentation → Windows). After following all steps as described, I tried to start the minimal_example_ocp.m (matlab).

I got the following Error:

Error using mex
MEX cannot find library 'acados', specified with the -l option.
 MEX searched for a file with one of the following names:
 libacados.a
acados.lib
libacados.lib
 Verify the library name is correct. If the library is not
 on the existing path, specify the path with the -L option.


Error in ocp_compile_interface (line 188)
            mex(mex_flags, FLAGS, LDFLAGS, acados_include, acados_interfaces_include, external_include, blasfeo_include, hpipm_include,...

Error in acados_ocp (line 164)
                ocp_compile_interface(obj.opts_struct);

Error in minimal_example_ocp (line 105)
ocp = acados_ocp(ocp_model, ocp_opts);

I attached the CMakeCache.txt which was created during the building process. I have tried diffrent option changes in CMakeLists. The latest version is attached. (edit:link in next post, because I am a new user)

In ocp_compile_interface.m the code is searching for the ‘lib’-folder. But actually I saw that it was not built. Do I need to change something in the options?

Thanks a lot for your help! Please do not hesitate to ask for more information - since I am not familiar with building etc. the information might seem incomplete for you.

Best regards
Björn

System
Windows 10
Matlab R2019b
CMake 3.19.4
MinGW (as add-on in Matlab) 19.2.0

CMakeLists.txt
CMakeCache.txt

In ocp_compile_interface.m the code is searching for the ‘lib’-folder. But actually I saw that it was not built. Do I need to change something in the options?

If you dont have the lib folder in the acados root folder, something certainly went wrong before going to Matlab.

The libs should be created there in the make install step.

1 Like

Hi,

I’m having the same issue @bmasterk described above setting up the matlab interface on a windows pc, did you find a solution yet?

I have a lib folder in my acados root folder and the path there seems correct, however it only contains one file: link_libs.json, not sure if that’s correct or if I should see some .lib files.

Thanks a lot,
Anne

Hello Anne,

yes. the solution was that the installation process did not work properly because I made some small mistakes. Just try to follow the installation instructions line by line. Don’t copy multiple lines at once into the powershell. :grin:

Best regards
Björn

Ok, thanks for the fast reply - I’ll try again and be careful not to miss any step :wink:

Hey you two,

I have the same error and am 95% sure that I did it as described in the instructions…
What did you change when reinstalling it, so I can look out for it?

Thanks in advance,
Albert

Edit: Installed it again on my laptop and it worked (apart from qpdunes: https://github.com/acados/acados/issues/762). Not sure what I changed tho…