3110https://www.ibm.com/developerworks/community/forums/atom/replies?topicUuid=77777777-0000-0000-0000-000014933369xlc++_r7 not able to link with third party lib Replies2013-01-25T15:48:48.990ZIBM Connections - Discussion Forumurn:lsid:ibm.com:forum:77777777-0000-0000-0000-000014933494Re: xlc++_r7 not able to link with third party lib2013-01-25T15:48:48.990ZDwayne_M10000005FDactive2013-01-25T15:48:48.990Z
You cannot link them to your application. The link fails because g++ uses a different way to "mangle" C++ function names than xlc++ does. But even if you could get past this and link successfully. There are other differences between g++ and xlc++, such as exception-handling and how objects are laid-out in memory that would prevent the application from running correctly (or at all).<br />
<br />
You should have the provider of the library give you a version that was built with xlc++.<br />
<br />
Dwayne Moore<br />
IBM Compilers Product Management
none, view_forum, view_categoryurn:lsid:ibm.com:forum:77777777-0000-0000-0000-000014933473Re: xlc++_r7 not able to link with third party lib2013-01-25T15:12:52.559ZSystemAdmin110000D4XKactive2013-01-25T15:12:52.559Z
Thanks for the response.<br />
<br />
If we have libraries received from third parties without their original source code, what is the way by which we can link them to our application?<br />
<br />
-Yash
none, view_forum, view_categoryurn:lsid:ibm.com:forum:77777777-0000-0000-0000-000014933422Re: xlc++_r7 not able to link with third party lib2013-01-25T13:58:54.797ZDwayne_M10000005FDactive2013-01-25T13:58:54.797Z
You cannot mix objects compiled with g++ with objects built with xlc++. The two compilers have different C++ object models, name mangling etc.<br />
Dwayne Moore<br />
IBM Compilers Product Management
none, view_forum, view_category