Re: [xml] Linking to dll version of libxml2, et al. with VS 2008
- From: Jeffrey Schmidt <schmidtj seapine com>
- To: Csaba Raduly <rcsaba gmail com>
- Cc: "xml gnome org" <xml gnome org>
- Subject: Re: [xml] Linking to dll version of libxml2, et al. with VS 2008
- Date: Fri, 28 Jan 2011 11:33:28 -0500
Thanks so much, that fixed the problem. I would have thought that WinSock would have been one of the
'default' libraries included by Visual Studio, but I guess not. I suppose that, since not every program uses
the network, not every program needs to be linked against the socket library.
Jeff Schmidt
Seapine Software, Inc.
Phone: 513.701.1551
-----Original Message-----
From: Csaba Raduly [mailto:rcsaba gmail com]
Sent: Friday, January 28, 2011 11:23 AM
To: Jeffrey Schmidt
Cc: xml gnome org
Subject: Re: [xml] Linking to dll version of libxml2, et al. with VS 2008
Hi Jeffrey,
On Fri, Jan 28, 2011 at 4:22 PM, Jeffrey Schmidt wrote:
However, I am getting a bunch of linker errors when building my projects,
similar to the following examples:
error LNK2019: unresolved external symbol __imp__WSAGetLastError 0
referenced in function _socket_errno libxml2_a_dll.lib
error LNK2019: unresolved external symbol __imp__closesocket 4 referenced in
function _xmlNanoHTTPFreeCtxt libxml2_a_dll.lib
These are WinSock functions; unrelated to MSVCRT. You need to make
sure that your application links to it (I think it's called
WS2_32.lib) in addition to system libraries like KERNEL32, USER23,
GDI32 etc. Maybe it's not added automatically to a new project.
http://msdn.microsoft.com/en-us/library/ms737629%28v=vs.85%29.aspx
Additionally, I'm getting a warning (which might be related?):
warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use
/NODEFAULTLIB:library
http://msdn.microsoft.com/en-us/library/6wtdswk0%28v=vs.71%29.aspx
You probably need to ensure that your project is compiled with the
same runtime library that was used with libxml2/iconv/zlib. Check the
readme files that came with your binaries.
Hope this helps,
Csaba
--
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]