Re: [libxml++] linkage error while using libxml++ in MinGW
- From: Philipp Klaus Krause <pkk spth de>
- To: tikcireviva <tikcireviva yahoo com hk>
- Cc: libxmlplusplus-general lists sourceforge net
- Subject: Re: [libxml++] linkage error while using libxml++ in MinGW
- Date: Sat, 03 Jun 2006 11:19:26 +0200
tikcireviva wrote:
> Hi Guys,
>
> I can build the libxml++ with MinGW successfully, however when I try to
> compile a simple program,
>
> g++ -o test.exe -O2 test.cpp -Lc:/mingw-5.0.2/include
>
> #include <libxml++/libxml++.h>
> int main()
> {
> xmlpp::DomParser parser;
> return 0;
> }
>
> it prompts the error like this,
>
> $ g++ -o test.exe -O2 test.cpp -Lc:/mingw-5.0.2/include
> C:/DOCUME~1/LOCALS~1/Temp/1/ccuwcaaa.o(.text+0x21):test.cpp: undefined
> reference to `_imp___ZN5xmlpp9DomParserC1Ev'
> C:/DOCUME~1/LOCALS~1/Temp/1/ccuwcaaa.o(.text+0x29):test.cpp: undefined
> reference to `xmlpp::DomParser::~DomParser()'
> collect2: ld returned 1 exit status
>
> So weird, do you guys know why is that? Am I doingthe libxml++
> compilation in a wrong way?
It looks as if you forgot to specify that libxml++ should be used by the
linker.
~> g++ -o test.exe -O2 -lxmlpp test.cpp -Lc:/mingw-5.0.2/include
(assuming that you copied the libxml++ binaries you created into you
library folder or they're in your library search path for some other
reason).
Philipp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]