I need to build an application with Sun Studio. This application uses a shared library which can only be build with Gnu C++. The shared lib has a C Interface, so that the co
Exception handling requires library and linker support which differs between Sun Studio C++ tool chain and Gnu C++ (In this way it is like name mangling, which you've already noted differs between the two tool chains). Using "C" linkage doesn't help you here, because the implementations of the functions you are linking to depend on that exception handling facility. You can't in general use C++ code built with two distinct tool chains within the same executable.
If you have to use Sun Studio because you are using closed-source libraries that are only compatible with Sun Studio, your easiest way forward is probably to get the library that "only builds with GNU C++" to build with the Sun C++ compiler, presuming that that library is open source. This might not be trivial and you might need to get support from the library's authors. I've done this when I had to by writing little scripts that look like GNU C++ commands that invoke the Sun compiler with the correct flags.
If that is out of the question, you might have to wrap the library you're trying to use in a service and use an RPC mechanism of some sort to access it from your Sun Studio compiled code.
Edit: Since the library linked to is specifically boost, this question might be helpful. In summary, some pieces of boost might build with your version of the Sun compiler.