FPC can compile .so/.dll with no problems, the problem here is name mangling changes from one GCC release to another (i think i will kill those GCC developers, just joking ) and i don't know if C++ classes are compatible with FPC ones, i don't think GCC classes are compattible with BCB or VC++ classes, most libs don't export classes for another language, look at windows .dlls all export functions not classes.
Talk to the FPC team for more info on this.