The two compilers have completely different name mangliing schemes. It is possible to use a library compiled with one for the other but it requires some other tool that will translate the imports to the dialect understood by the other compiler.

Can't you use the same compiler for both the library and the application?