You have to set Eclipse to do "-l xerces-c" and set the "-L <path to
libxerces-c.so>". I noticed that currently Eclipse is executing
-L"C:\cygwin\home\lars\xerces-c-src_2_8_0\include" that should be something
along the line of -L"C:\cygwin\home\lars\xerces-c-src_2_8_0\lib".
Unfortunately I don't have Eclipse installed so I can't give you exact
instructions on how to make these settings.

Keith

On Jan 8, 2008 5:57 AM, Lars Uffmann <[EMAIL PROTECTED]> wrote:

> Alberto Massari wrote:
> >>    $ XERCESCROOT = /home/lars/xerces-c-src_2_8_0/src/xercesc/
> > XERCESCROOT should point to /home/lars/xerces-c-src_2_8_0
>
> Great! That did it, thanks a lot :) Someone might wanna add that in the
> build instructions - it wasn't obvious IMHO - at least not for dummies
> like me.
>
> Now the next step in my problems:
> I was able to include the header files by adding the compiler option
> -I"C:\cygwin\home\lars\xerces-c-src_2_8_0\include"
>
> But of course I'd love to see all those include files in /usr/include
> (c:\cygwin\usr\include) - is there any way to make Xerces so that they
> are put there? Or is copying the include directory there all I need to do?
>
> And while I can workaround that issue, the other problem is that the
> linker complains about undefined references (for all xerces functions
> calls in the minimal main-function) - what library do I need to include
> for xerces functionality to be available?
>
> Right now, my (Eclipse + Gnu toolchain) environment says upon compiling:
>  >>>
> g++ -L"C:\cygwin\home\lars\xerces-c-src_2_8_0\include"
> -o"readNetwork.exe"  ./src/main.o
> ./src/main.o: In function `_ZN11xercesc_2_810XMLDeleterD1Ev':
>
> C:/cygwin/home/lars/xerces-c-src_2_8_0/include/xercesc/util/PlatformUtils.hpp:851:
> undefined reference to `xercesc_2_8::XMLUni::fgXercescDefaultLocale'
>
> C:/cygwin/home/lars/xerces-c-src_2_8_0/include/xercesc/util/PlatformUtils.hpp:851:
> undefined reference to `xercesc_2_8::XMLPlatformUtils::Initialize(char
> const*, char const*, xercesc_2_8::PanicHandler*,
> xercesc_2_8::MemoryManager*, bool)'
>
> C:/cygwin/home/lars/xerces-c-src_2_8_0/include/xercesc/util/PlatformUtils.hpp:851:
> undefined reference to `xercesc_2_8::XMLPlatformUtils::Terminate()'
> collect2: ld returned 1 exit status
>  >>>
>
> Thanks again for any help!
>
>    Lars
>
>
>
> PS: Attached is the example program for initialization of Platform
> utilities:
>  >>>
> #include <xercesc/util/PlatformUtils.hpp>
> // Other include files, declarations, and non-Xerces-C++ initializations.
> XERCES_CPP_NAMESPACE_USE
>
> int main(int argc, char* argv[])
> {
>   try {
>     XMLPlatformUtils::Initialize();
>   }
>   catch (const XMLException& toCatch) {
>     // Do your failure processing here
>     return 1;
>   }
>
>   // Do your actual work with Xerces-C++ here.
>
>   XMLPlatformUtils::Terminate();
>
>   // Other terminations and cleanup.
>   return 0;
> }
>  >>>
>



-- 
www.savedbycuriosity.com

Reply via email to