In MAC there are two different kinds of C++ standard libraries: libstdc++ and libc++, and mixing them can have link errors as this post shows. So before I decide to use C++ standard library, I will first check the C++ standard library employed by the external library I will use. If the external library is dynamic library, I can use otool -L
to check the standard library that it has invoked. Then my question is: what if the library is static library? Can I analyze the object file to get some ideas of its employed standard library?
Asked
Active
Viewed 50 times
1
-
1Try to link it to libstdc++, if that fails try libc++. – n. m. could be an AI Aug 25 '15 at 12:50