Hi,
I am using libxml2-2.9.1 in one of my win32 project. It is a sample project
that uses xmlReaderForFile api from libxml2(statically linked). I have
followed below stepd to built libxml2.
1. I have built libiconv-1.14 on VS 2010 as mentioned below. This is built
with "Multi-threaded Debug DLL (/MDd)" runtime library and debug win32
setting.
http://www.codeproject.com/Articles/302012/How-to-Build-libiconv-with-Microsoft-Visual-Studio
2. I used this libiconv.lib to build libxml2.lib with the same setting i.e.
"Multi-threaded Debug DLL (/MDd)" runtime library and debug win32 setting. I
have also included iconv.h while building libxml2.lib
3. Now when I am statically linking my libxml2.lib to my project, I am
getting following linker errors. My sample project also has "Multi-threaded
Debug DLL (/MDd)" runtime library and debug win32 setting.
libxml2.lib(encoding.obj) : error LNK2019: unresolved external symbol
__imp__libiconv_close referenced in function _xmlFindCharEncodingHandler
libxml2.lib(encoding.obj) : error LNK2019: unresolved external symbol
__imp__libiconv_open referenced in function _xmlFindCharEncodingHandler
libxml2.lib(encoding.obj) : error LNK2019: unresolved external symbol
__imp__libiconv referenced in function _xmlIconvWrapper
I have found following similar discussion here:
https://www.mail-archive.com/xml [ at ] gnome.org/msg06784.html
But I do not understand what is the meaning of "I was building libxml2 with
iconv.h.msvc-shared" by john blair....
Can anyone please help to resolve these linker errors.
Thanks in advance !!!
I am using libxml2-2.9.1 in one of my win32 project. It is a sample project
that uses xmlReaderForFile api from libxml2(statically linked). I have
followed below stepd to built libxml2.
1. I have built libiconv-1.14 on VS 2010 as mentioned below. This is built
with "Multi-threaded Debug DLL (/MDd)" runtime library and debug win32
setting.
http://www.codeproject.com/Articles/302012/How-to-Build-libiconv-with-Microsoft-Visual-Studio
2. I used this libiconv.lib to build libxml2.lib with the same setting i.e.
"Multi-threaded Debug DLL (/MDd)" runtime library and debug win32 setting. I
have also included iconv.h while building libxml2.lib
3. Now when I am statically linking my libxml2.lib to my project, I am
getting following linker errors. My sample project also has "Multi-threaded
Debug DLL (/MDd)" runtime library and debug win32 setting.
libxml2.lib(encoding.obj) : error LNK2019: unresolved external symbol
__imp__libiconv_close referenced in function _xmlFindCharEncodingHandler
libxml2.lib(encoding.obj) : error LNK2019: unresolved external symbol
__imp__libiconv_open referenced in function _xmlFindCharEncodingHandler
libxml2.lib(encoding.obj) : error LNK2019: unresolved external symbol
__imp__libiconv referenced in function _xmlIconvWrapper
I have found following similar discussion here:
https://www.mail-archive.com/xml [ at ] gnome.org/msg06784.html
But I do not understand what is the meaning of "I was building libxml2 with
iconv.h.msvc-shared" by john blair....
Can anyone please help to resolve these linker errors.
Thanks in advance !!!