gcc 7.3.0 and mex functions on linux
Show older comments
Hello I know that latest gcc compiler version for the latest matlab release is 6.3.x. However since I had to upgrade my notebook to ubuntu bionic I wonder whether there is a way to use 7.3 instead.
The first thing I tried was to compile yprime.c and then test it. It worked but there is something odd going on (it does not work for more complicated mex function though).
ld yprime.mexa64
ld: warning: libmx.so, needed by yprime.mexa64, not found (try using -rpath or -rpath-link)
ld: warning: libmex.so, needed by yprime.mexa64, not found (try using -rpath or -rpath-link)
ld: warning: cannot find entry symbol _start; not setting start address
yprime.mexa64: undefined reference to `mxIsDouble'
yprime.mexa64: undefined reference to `mxGetM'
yprime.mexa64: undefined reference to `mxIsComplex'
yprime.mexa64: undefined reference to `mxIsSparse'
yprime.mexa64: undefined reference to `mexErrMsgIdAndTxt'
yprime.mexa64: undefined reference to `mxGetN'
yprime.mexa64: undefined reference to `mexWarnMsgIdAndTxt'
yprime.mexa64: undefined reference to `mxCreateDoubleMatrix_730'
yprime.mexa64: undefined reference to `mxGetPr'
libmex.so is under MATLABROOT/bin/glnxa64 as usual and one of the flags points exactly to that directory. Using a makefile I managed to get rid of the warnings but not of the "undefined reference", although all the possible paths and libs were included during compilation and linking process.
Is there a way around? Or I don't have a choice but to downgrade gcc? If that is the case, is there a recipe to be followed?
Many thanks
Ed
Answers (1)
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) 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!