9.11.2011 10:21, OBD kirjoitti:
Hi, I am trying to build a software on HP-UX (HP-UX 11.00). It links against Xerces and Xalan libraries (amongst others). I am getting the following errors during the final linking phase. Can somebody help me understand the problem? I compiled Xerces and Xalan using aCC (as recommended) while I am using gcc/g++ for building this software, could that be a problem?
Yes!
/usr/ccs/bin/ld: Duplicate symbol "global constructors keyed to ISSECURE" in files objs/HP-UX/Main.o and objs/HP-UX/Test.o /usr/ccs/bin/ld: Duplicate symbol "ISSECURE" in files objs/HP-UX/Main.o and objs/HP-UX/Test.o
<snip>
/usr/ccs/bin/ld: Unsatisfied symbols: xalanc_1_10::NodeRefList::~NodeRefList()(first referenced in objs/HP-UX/XmlFileContentProbe.o) (code) xalanc_1_10::XalanSourceTreeParserLiaison::setEntityResolver(xercesc_2_8::EntityResolver*) (first referenced in objs/HP-UX/XmlFileContentProbe.o) (code) xalanc_1_10::XalanSourceTreeDOMSupport::~XalanSourceTreeDOMSupport()(first referenced in objs/HP-UX/XmlFileContentProbe.o) (code) xercesc_2_8::XMemory::operator delete(void*)(first referenced in
Somewhere in a C++ learning book should be told that mixing binary code from different compilers, even from different versions of the same compiler, for instance G++, isn't possible :( The "Name mangling in C++" in: http://en.wikipedia.org/wiki/Name_mangling tries to explain the issue. So you should try G++ with the Xerces and Xalan libraries too or use aCC (A C++ compiler too?) for everything.