Error using mex (mxErrMsgTxt)
10 views (last 30 days)
Show older comments
morteza shafizah
on 17 Aug 2017
Answered: Nadin Mari
on 1 Feb 2018
I have a error when run this code of mdl4bmf package:
CODE: mex -Iasso-utils/ -largeArrayDims -O -v -output asso -DMATLAB ./asso.obj ./matlabasso.obj
ERROR: Error using mex ./matlabasso.obj:matlabasso.c:(.text+0x371): undefined reference to `mxErrMsgTxt' collect2.exe: error: ld returned 1 exit status
Please help me to solve this problem, OS win10 , matlab version 2017a
0 Comments
Accepted Answer
James Tursa
on 17 Aug 2017
Source code typo. The function name is mexErrMsgTxt, not mxErrMsgTxt.
4 Comments
James Tursa
on 18 Aug 2017
The error message is a linker error. It means that the compiled code has referenced a function called mxErrMsgTxt, but the linker cannot find any such function in the object code or libraries that are being linked.
So, look in the source code matlabasso.c for a call to mxErrMsgTxt and change that call to mexErrMsgTxt.
More Answers (1)
See Also
Categories
Find more on MATLAB Support for MinGW-w64 C/C++ Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!