am using matlab R2013a and am installed minGW and gnumex for gcc compiler for my windows pc but while compiling it showing the errors:
the program is
void mexFunction(int nlhs, mxArray plhs[], int nrhs, const mxArray prhs[]) { mexPrintf("Hello world!\n"); return; }
the error is
mex hello.cc C:\Users\karna\AppData\Local\Temp\mex_vPTczV\hello.obj:hello.cc:(.text+0x9): undefined reference to `mexPrintf' collect2.exe: error: ld returned 1 exit status link command: g++ -shared C:\Users\karna\AppData\Roaming\MATHWO~1\MATLAB\R2013a\gnumex\mex.def -o hello.mexw64 -LC:\Users\karna\AppData\Roaming\MATHWO~1\MATLAB\R2013a\gnumex -s C:\Users\karna\AppData\Local\Temp\mex_vPTczV\hello.obj -llibmx -llibmex -llibmat
C:\PROGRA~1\MATLAB\R2013A\BIN\MEX.PL: Error: Link of 'hello.mexw64' failed.
Error using mex (line 206) Unable to complete successfully.
help me how to get rid of this error.
Log in to post a comment.
am using matlab R2013a and am installed minGW and gnumex for gcc compiler for my windows pc but while compiling it showing the errors:
the program is
include "mex.h"
void mexFunction(int nlhs, mxArray plhs[],
int nrhs, const mxArray prhs[])
{
mexPrintf("Hello world!\n");
return;
}
the error is
C:\PROGRA~1\MATLAB\R2013A\BIN\MEX.PL: Error: Link of 'hello.mexw64' failed.
Error using mex (line 206)
Unable to complete successfully.
help me how to get rid of this error.