From: Igor Zlatkovic (igorz@dialup.nacamar.de)
Date: Sun Jan 21 2001 - 14:34:13 EST
Hi there.
The following applies to the upcoming release 2.2.12 under Win32, and that
only if using Microsoft Visual C++ compiler to build libxml2. It is nothing
critical, as it has nothing to do with the actual functionality of libxml2,
but only with the build process.
Few days ago, I sent two MSDEV project files to Daniel Veillard. According
to Daniel, these project files shall appear in the next release, 2.2.12. One
of these project files enables compiling libxml2 as a shared object (DLL)
under Win32, using Visual C++.
In the meantime, I have discovered something. Under few very common
circumstances, the linker refuses to build an import library. Further
investigation revealed that the resulting libxml2.dll, which was built,
exports no symbols. Having a DLL which exports nothing, the linker thought
it apropriate to avoid building the import library.
Well, a shared object without exported symbols is like a breeding bull
without balls, if you whould excuse my language. I had to act and produce a
solution before libxml2-2.2.12 comes out, otherwise the new project file
which builds the DLL would be unusable to majority of those who would
eventually use it.
The folowing patch appearantly solves the issue:
E:\home\igor\src>diff -c libxml2-2.2.11.orig\include\win32config.h
libxml2-2.2.11\include\win32config.h
*** libxml2-2.2.11.orig\include\win32config.h Fri Jan 05 2001 07:39:34 AM
--- libxml2-2.2.11\include\win32config.h Thu Jan 18 2001 06:53:27 PM
***************
*** 5,12 ****
--- 6,17 ----
#include <io.h>
+ #ifdef _USRDLL
+ #define LIBXML_DLL_IMPORT __declspec(dllexport)
+ #else
#define LIBXML_DLL_IMPORT
+ #endif
+
#define SOCKLEN_T int
#ifdef INCLUDE_WINSOCK
What do you think about it? If there is anyone out there who is familiar
with building libxml2 under Win32 (perhaps the person who introduced that
'LIBXML_DLL_IMPORT' in the code)? Is the patch above in place, or would it
break something? I have tested it here and it works fine, but I am just one
mortal with one computer...
Ciao
Igor
---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
This archive was generated by hypermail 2b29 : Sun Jan 21 2001 - 18:43:27 EST