This is due to the visibility of the symbols in the libraries that you compiled. The GFP 4.0 -fvisibility = hidden parameter is used to hide characters for DSO / shared object libraries in order to reduce connection / load time. However, I saw some blogs on the Internet using the switch in some peculiar way when compiling static libraries. I really could not figure out what the effect or intent of this is. As far as I know, static libraries need symbol information displayed for functions that you intend to use from the outside.
I got the same linker error with boost :: exceptions. However, in order to catch exceptions of a specific type, GCC requires type information, but this is a run-time problem. Thus, even if it compiles / links correctly, hiding character information in your projects is not the right solution if you intend to catch an exception from outside the library. See Apple Documentation:
If your character uses runtime identifier (RTTI) information, exceptions, or dynamic quotes for an object that is defined in another library, your character must be visible if it is waiting for requests from another library to be processed. For example, if you define a catch handler for a type in the C ++ standard library, and you want to catch the exceptions of that type that are written by the C ++ standard library, you must make sure that your typeinfo object is visible.
Source: http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html
I really needed to change the exception header with the macros described here to get my compilation project and link: http://gcc.gnu.org/wiki/Visibility . This was necessary even with -fvisibility = default, which makes me think that it was some kind of linker error.
However, I registered a bug with Boost here: https://svn.boost.org/trac/boost/ticket/4594#comment:11
Here you can find my configuration: http://lists.boost.org/boost-users/2011/07/69251.php
source share