[xml] Please help resolve linker error:



Title: Message
Hello, I have searched the archives and can't seem to find the solution to my problem.
I've only used 2.5.10 a little a few months ago.
I've had to come back to it recently and was able to successfully compile a console app using it with Microsoft Visual Studio .NET
I compiled it statitcally and made sure I used mscrt as the runtime by specyfing the /MD switch.
 
But now I am trying to create a windows dll that also uses libxml2.
When I compile with version 2.5.10, I get linker errors such as (I've only listed a few):
 
libxml2_a.lib(globals.obj) : error LNK2005: _docbDefaultSAXHandler already defined in my_dll.obj
libxml2_a.lib(globals.obj) : error LNK2005: _htmlDefaultSAXHandler already defined in my_dll.obj
libxml2_a.lib(globals.obj) : error LNK2005: _xmlMemStrdup already defined in my_dll.obj
 
libxml2_a.lib(globals.obj) : warning LNK4006: _docbDefaultSAXHandler already defined in my_dll.obj; second definition ignored
libxml2_a.lib(globals.obj) : warning LNK4006: _htmlDefaultSAXHandler already defined in my_dll.obj; second definition ignored
libxml2_a.lib(globals.obj) : warning LNK4006: _xmlMemStrdup already defined in my_dll.obj; second definition ignored
 
After a little while, I decided to look and see if there is a newer version.
So I downloaded the binaries for version 2.6.7.
This time, I get different linker errors. All of them pertain to xmlIO and some of them are:
 
libxml2_a.lib(xmlIO.obj) : error LNK2019: unresolved external symbol _gzopen referenced in function _xmlGzfileOpen_real
libxml2_a.lib(xmlIO.obj) : error LNK2019: unresolved external symbol _gzdopen referenced in function _xmlGzfileOpen_real
libxml2_a.lib(xmlIO.obj) : error LNK2019: unresolved external symbol _gzread referenced in function _xmlGzfileRead
 

I am not yet familiar enough with libxml2 to quickly find out what the problems are.
If anyone can help to get me going, I would really appreciate it.
 
Thanks,
 

-- Sanjay
 


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