Cannot link using mex on mac os
2 views (last 30 days)
Show older comments
I'm trying to compile glpkmex on mac os X maverick running matlab R2012a, but when I run
mex -I../glpk/src/ -I/usr/include/c++/4.2.1 -I/usr/include -Dchar16_t=uint16_T glpkcc.cpp ../glpk/src/.libs/libglpk.a
I got this output
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 ld: library not found for -lstdc++ clang: error: linker command failed with exit code 1 (use -v to see invocation)
mex: link of ' "glpkcc.mexmaci64"' failed.
Any suggestion?
3 Comments
Peter Caday
on 24 Apr 2014
This post mentions a potentially similar-looking problem for Mathematica.
Following that page, perhaps you could try editing mexopts.sh and change appearances of "-mmacosx-version-min=10.8" to "-mmacosx-version-min=10.6", or try changing "-lstdc++" to "-lstdc++.6"?
Answers (0)
See Also
Categories
Find more on Data Synthesis 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!