Error while compiling Mex files

Hi :wave:

I am using acados for energy optimization in Parallel hybrid and I am trying to compile and generate an S_function to use in Simulink. But while compiling I am getting the below error and I don’t have any idea about these generated impl_dae_jacobian functions.
I am using the following versions
Windows Matlab 2018b,
Cmake 3.26.1.

MEX completed successfully.
acados MEX interface compiled successfully
compiling NMPC_acados_pt_em_ocp_set_ext_fun_dyn_0_impl_dae_fun
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
compiling NMPC_acados_pt_em_ocp_set_ext_fun_dyn_0_impl_dae_fun_jac_x_xdot_z
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
compiling NMPC_acados_pt_em_ocp_set_ext_fun_dyn_0_impl_dae_jac_x_xdot_u_z
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
compiling NMPC_acados_pt_em_ocp_set_ext_fun_constr_0_h_fun
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
compiling NMPC_acados_pt_em_ocp_set_ext_fun_constr_0_h_fun_jac_uxt_zt
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
compiling NMPC_acados_pt_em_ocp_set_ext_fun_constr_0_h_fun_jac_uxt_zt_hess
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
Error using eval
Unrecognized function or variable 'NMPC_acados_pt_em_ocp_set_ext_fun_dyn_0_impl_dae_fun_jac_x_xdot'.

Error in ocp_set_ext_fun (line 730)
    C_ocp_ext_fun = eval([mex_names{ii}, '(C_ocp, C_ocp_ext_fun, model_struct, opts_struct)']);

Error in acados_ocp (line 211)
            obj.C_ocp_ext_fun = ocp_set_ext_fun(obj.C_ocp, obj.C_ocp_ext_fun,...

Error in NMPC_acados_solver_pt_em (line 156)
ocp = acados_ocp(ocp_model, ocp_opts);

Error in NMPC_acaods_ocp_em (line 37)
ocp = NMPC_acados_solver_pt_em(model, constraint);

Error in NMPC_acados_simulink_em (line 9)
NMPC_acaods_ocp_em;

Thanks and Regards
Raghu Boppana

Hi Raghu,

I loosely remember that there was a limit on the length of model_name in the Matlab interface.
Does shortening the model name fix the issue?

Best!