3 added 8 characters in body edited Oct 25 '13 at 15:32 Szabolcs 171k1818 gold badges466466 silver badges996996 bronze badges This is what I've been able to gather: There are two implementations of the standard C++ library available on OS X: libstdc++ and libc++. They are not binary compatible and libMLi3 requires libstdc++. On 10.8 and earlier libstdc++ is chosen by default, on 10.9 libc++ is chosen by default. To ensure compatibility with libMLi3, we need to choose libstdc++ manually. To do this, add -stdlib=libstdc++ to the linking command. Note: the Makefile supplied with the MathLink examples uses the c++ command for linking (not cc or ld). In this case the -lstdc++ option can be removed from the linking command. However if you use cc for linking, then it's necessary to specify both of -stdlib=libstdc++ -lstdc++. This is what I've been able to gather: There are two implementations of the standard C++ library available on OS X: libstdc++ and libc++. They are not binary compatible and libMLi3 requires libstdc++. On 10.8 and earlier libstdc++ is chosen by default, on 10.9 libc++ is chosen by default. To ensure compatibility with libMLi3, we need to choose libstdc++ manually. To do this, add -stdlib=libstdc++ to the linking command. Note: the Makefile supplied with the MathLink examples uses the c++ command for linking (not cc). In this case the -lstdc++ option can be removed from the linking command. However if you use cc for linking, then it's necessary to specify both of -stdlib=libstdc++ -lstdc++. This is what I've been able to gather: There are two implementations of the standard C++ library available on OS X: libstdc++ and libc++. They are not binary compatible and libMLi3 requires libstdc++. On 10.8 and earlier libstdc++ is chosen by default, on 10.9 libc++ is chosen by default. To ensure compatibility with libMLi3, we need to choose libstdc++ manually. To do this, add -stdlib=libstdc++ to the linking command. Note: the Makefile supplied with the MathLink examples uses the c++ command for linking (not cc or ld). In this case the -lstdc++ option can be removed from the linking command. However if you use cc for linking, then it's necessary to specify both of -stdlib=libstdc++ -lstdc++. 2 added 265 characters in body edited Oct 25 '13 at 15:24 Szabolcs 171k1818 gold badges466466 silver badges996996 bronze badges This is what I've been able to gather: There are two implementations of the standard C++ library available on OS X: libstdc++ and libc++. They are not binary compatible and libMLi3 requires libstdc++. On 10.8 and earlier libstdc++ is chosen by default, on 10.9 libc++ is chosen by default. To ensure compatibility with libMLi3, we need to choose libstdc++ manually. To do this, removeadd -stdlib=libstdc++ to the linking command. Note: the Makefile supplied with the MathLink examples uses the c++ command for linking (not cc). In this case the -lstdc++ option can be removed from the linking command and add. However if you use cc for linking, then it's necessary to specify both of -stdlib=libstdc++ -lstdc++ instead. This is what I've been able to gather: There are two implementations of the standard C++ library available on OS X: libstdc++ and libc++. They are not binary compatible and libMLi3 requires libstdc++. On 10.8 and earlier libstdc++ is chosen by default, on 10.9 libc++ is chosen by default. To ensure compatibility with libMLi3, we need to choose libstdc++ manually. To do this, remove -lstdc++ from the linking command and add -stdlib=libstdc++ instead. This is what I've been able to gather: There are two implementations of the standard C++ library available on OS X: libstdc++ and libc++. They are not binary compatible and libMLi3 requires libstdc++. On 10.8 and earlier libstdc++ is chosen by default, on 10.9 libc++ is chosen by default. To ensure compatibility with libMLi3, we need to choose libstdc++ manually. To do this, add -stdlib=libstdc++ to the linking command. Note: the Makefile supplied with the MathLink examples uses the c++ command for linking (not cc). In this case the -lstdc++ option can be removed from the linking command. However if you use cc for linking, then it's necessary to specify both of -stdlib=libstdc++ -lstdc++. 1 answered Oct 25 '13 at 15:05 Szabolcs 171k1818 gold badges466466 silver badges996996 bronze badges This is what I've been able to gather: There are two implementations of the standard C++ library available on OS X: libstdc++ and libc++. They are not binary compatible and libMLi3 requires libstdc++. On 10.8 and earlier libstdc++ is chosen by default, on 10.9 libc++ is chosen by default. To ensure compatibility with libMLi3, we need to choose libstdc++ manually. To do this, remove -lstdc++ from the linking command and add -stdlib=libstdc++ instead.