[libxml++] linkage error while using libxml++ in MinGW



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?

Best regards,

tikcireviva







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]