Hi all,

I'm moving my application from red hat 7.2 to red hat 9 and I'm facing probleme to get 
it compiled.

Here is the code

#include <util/PlatformUtils.hpp>

int main(int argc, char * argv[])
{
        //std::string str="Trying to compile some XML stuff";
        //std::cout << str << std::endl;
        // Initialize the XML4C2 system
        try
        {
                xercesc::XMLPlatformUtils::Initialize();
        }
        catch (const xercesc::XMLException & toCatch)
        {
                //std::cout << "Got an error" << std::endl;
        }
}

Here is how I try to compile it
g++ -I/usr/include/xercesc testXML.C -lxerces-c -o testXML

I've installed xercesc 2.2.0 (rpm version)
% rpm -qa | grep xerces
xerces-c-devel-2.2.0-2
xerces-c-2.2.0-2

The library is in /usr/lib and available to the linker
% grep xerces /etc/ld.so.cache
Binary file /etc/ld.so.cache matches

Here are the the errors when compiling (in fact this is the linking that makes 
problems.)
%g++ -I/usr/include/xercesc testXML.c -lxercesc -o testXML
/tmp/ccmHwbd8.o(.text+0x14): In function `main':
: undefined reference to `xercesc_2_2::XMLUni::fgXercescDefaultLocale'
/tmp/ccmHwbd8.o(.text+0x19): In function `main':
: undefined reference to `xercesc_2_2::XMLPlatformUtils::Initialize(char
const*)'
/tmp/ccmHwbd8.o(.gcc_except_table+0x10): undefined reference to `typeinfo for
xercesc_2_2::XMLException'
collect2: ld returned 1 exit status

I don't quite understand what's going on. Any hint to solve that ?
Thanks

Steel

********** PROTEGEZ VOS E-MAILS !********** 
Avec Tiscali SuperMail, vos e-mails en toute sécurité ! 
Anti Spam personnalisable 
Anti Virus actualisé en permanence 
et de nombreux bonus... 
Pour en savoir plus, rendez-vous sur http://www.tiscali.fr/supermail/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to