error LNK2019: unresolved external symbol emlrtReturnArrays

18 views (last 30 days)
Ion Iturbe
Ion Iturbe on 10 Feb 2017
Commented: Hao Ren on 9 May 2018
I'm generating C code from Matlab function.
I would like to test generated C code in Matlab, using a C mex function. I've seen that while generating code, an "interface" folder is also generated inside the "codegen" folder, so I tried to compile the mex function inside "codegen/interface/_coder_MyFunctionName_mex.c" file.
But I'm getting the "unresolved external symbol" error for allmost all the "emlrtXXX" functions.
Am I doing something wrong?

Answers (1)

Michelle Wu
Michelle Wu on 17 Feb 2017
The MATLAB Answers post attached below looks relevant to the error you saw:
The error looks like a linker related issue. You probably need to include all the necessary source files to the MEX command and compile them together.

Sign in to comment.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by