I still have the same errors when linking.

---------- Initial Header -----------

From      : Alberto Massari <[EMAIL PROTECTED]>
To          : [EMAIL PROTECTED]
Cc          : 
Date      : Thu, 15 Jan 2004 11:38:02 +0100
Subject : Re: Link problem on Red Hat 9

At 11.31 15/01/2004 +0100, Steel Bash wrote:
>I tried both of your suggestions but it doesn't work.

Can you try changing your code into

#include <xercesc/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
         {
                 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::Initialize();
         }
         catch (const XERCES_CPP_NAMESPACE_QUALIFIER XMLException & toCatch)
         {
                 //std::cout << "Got an error" << std::endl;
         }
}

and compile it using

g++ testXML.C -lxerces-c -o testXML

Alberto

>---------- Initial Header -----------
>
>From      : Alberto Massari <[EMAIL PROTECTED]>
>To          : [EMAIL PROTECTED]
>Cc          :
>Date      : Thu, 15 Jan 2004 11:26:50 +0100
>Subject : Re: Link problem on Red Hat 9
>
>At 11.21 15/01/2004 +0100, Steel Bash wrote:
> >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 how I try to compile it
> >g++ -I/usr/include/xercesc testXML.C -lxerces-c -o testXML
>
>Shouldn't you use also -L/usr/lib/xercesc (use the path where xerces-c.so
>is found)?
>
>Alberto
>
>
> >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]
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>********** 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]



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



********** 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