Help with mex setup Fortran Matlab 2013b on OS X 10.8
1 view (last 30 days)
Show older comments
I am trying to compile the yprime.F example, but I get the following error:
Undefined symbols for architecture x86_64: "_mexfunction_", referenced from: -exported_symbol[s_list] command line option ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
mex: link of ' "yprime.mexmaci64"' failed.
Here is the relevant part of my mexopts.sh file:
FC='/usr/local/bin/gfortran'
FFLAGS='-fexceptions -m64 -fbackslash'
FC_LIBDIR=`$FC -print-file-name=libgfortran.dylib 2>&1 | sed -n '1s/\/*libgfortran\.dylib//p'`
FC_LIBDIR2=`$FC -print-file-name=libgfortranbegin.a 2>&1 | sed -n '1s/\/*libgfortranbegin\.a//p'`
FLIBS="$MLIBS -L$FC_LIBDIR -lgfortran -L$FC_LIBDIR2 -lgfortranbegin"
FOPTIMFLAGS='-O'
FDEBUGFLAGS='-g'
Could some one please point to instructions on how to setup the gfortran mex compilation capabilities??? Compiling prime.c is not a problem at all, but I am not a C programmer. Thanks!!!!
0 Comments
Answers (0)
See Also
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!