Skip to content

Instantly share code, notes, and snippets.

@kyamagu
Last active January 2, 2016 21:29
Show Gist options
  • Save kyamagu/8363310 to your computer and use it in GitHub Desktop.
Save kyamagu/8363310 to your computer and use it in GitHub Desktop.
Matlab MEX configurations to be compatible with OS X Mavericks. 1) Change target to 10.9, 2) Change from libstdc++ to libc++, 3) Use c++11, 4) Add CHAR16_T macro
CC='clang'
CXX='clang++'
SDKROOT='/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/'
MACOSX_DEPLOYMENT_TARGET='10.9'
CFLAGS="$CFLAGS -Dchar16_t=uint16_t"
CXXFLAGS="$CXXFLAGS -std=c++11 -stdlib=libc++ -DCHAR16_T"
CXXLIBS="$MLIBS -lc++"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment