You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Pankaj Thakur <pt...@yahoo.com> on 2009/11/06 05:48:57 UTC

Linking xercesc_2.lib with MINGW-GCC compiled code.

Hi,

I was using MSVC6 to build my application. Now i am porting it to mingw-gcc, i am able to compile my program but once i link available xercesc-2.6.lib gives linker error. Please find below descriptions:

L:\helloxer>g++ -o hello hello.o -L"lib" -l"xerces-c_2"
hello.o:hello.cpp:(.text+0x16d): undefined reference to `_imp___ZN11xercesc_2_66
XMLUni22fgXercescDefaultLocaleE'
hello.o:hello.cpp:(.text+0x175): undefined reference to `_imp___ZN11xercesc_2_61
6XMLPlatformUtils10InitializeEPKcS2_PNS_12PanicHandlerEPNS_13MemoryManagerE'
collect2: ld returned 1 exit status

I am using xercesc_2.lib which i for from 2.6.0 xercesc Bin Distribution. Is it right way of linking or do i need to take xercess2.6.0 source distribution and build lib for mingw?

Please provide your suggestions to fix this.

Thanks,
Pankaj 


 
----- Original Message ----
From: Alberto Massari <am...@datadirect.com>
To: c-dev@xerces.apache.org
Cc: c-dev-help@xerces.apache.org
Sent: Thu, 15 October, 2009 4:19:24 PM
Subject: Re: xerces-c 2.6.0 source distribution

http://archive.apache.org/dist/xml/xerces-c/Xerces-C_2_6_0/

Alberto

Pankaj Thakur wrote:
> Hi,
>
> My component uses xerces-c 2.6.0 lib. I am not able to get source distribution for this version.
> Can any one send relevant link for this source distribution.
>
> Thanks,
> Pankaj
>
>
>      Try the new Yahoo! India Homepage. Click here. http://in.yahoo.com/trynew
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


      Try the new Yahoo! India Homepage. Click here. http://in.yahoo.com/trynew

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: Linking xercesc_2.lib with MINGW-GCC compiled code.

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Pankaj,

Pankaj Thakur <pt...@yahoo.com> writes:

> I am using xercesc_2.lib which i for from 2.6.0 xercesc Bin Distribution. 
> Is it right way of linking or do i need to take xercess2.6.0 source 
> distribution and build lib for mingw?

This library is built using one of the VC++ compiler and the ABI used
by VC++ and g++ are incompatible. So, yes, you will need to build the 
Xerces-C++ library for MinGW from source yourself.

Boris

-- 
Boris Kolpackov, Code Synthesis        http://codesynthesis.com/~boris/blog
Open-source XML data binding for C++   http://codesynthesis.com/products/xsd
XML data binding for embedded systems  http://codesynthesis.com/products/xsde
Command line interface to C++ compiler http://codesynthesis.com/projects/cli


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org