Hi
I successfully installed Acados using Visual Studio 2019 on Windows, but when I tried running the “minimal_example_ocp.m” example, I encountered the following error:
*Error using mex*
*MEX cannot find library 'acados_ocp_solver_pendulum', specified with the -l option.*
* MEX searched for a file with one of the following names:*
* libacados_ocp_solver_pendulum.lib*
*acados_ocp_solver_pendulum.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 make_mex_pendulum (line 134)*
* mex(FLAGS, LDFLAGS, COMPDEFINES, COMPFLAGS, acados_include, template_lib_include, external_include, blasfeo_include, hpipm_include,...*
*Error in pendulum_mex_solver (line 47)*
* make_mex_pendulum();*
*Error in AcadosOcpSolver (line 71)*
* obj.t_ocp = mex_solver();*
*Error in acados_ocp (line 41)*
* solver = AcadosOcpSolver(ocp, output_dir);*
*Error in minimal_example_ocp (line 113)*
*ocp_solver = acados_ocp(ocp_model, ocp_opts, simulink_opts);*
Upon investigation, I found that the file “acados_ocp_solver_pendulum.lib” was located in a subfolder with the same name inside the c_generated_code
directory. After manually moving the file to the correct location, the examples were able to run successfully.
How can I resolve this issue without needing to manually move files?
Best regards,
Anthony