[xml] Re: Re: static build of libxml2 on windows



Igor Zlatkovic <igor zlatkovic com> schrieb am 11.03.2004, 17:22:24:
oliverst online de wrote:

I wanted to change the configure script for windows, so it also builds
the static lib with the "LIBXML_STATIC_FOR_DLL" define, what is quite
essential to get DLL with a static libxml2 in it to work properly.
Now I just wonder what would be the better way.
Add a third state of static (add "dll" to existing "no" and "yes") or
just build an additional lib named "libxml2_a_dll.lib" (for MSVC) if
static is set to "yes"?

Better build an additional lib. But...

Take a critic glance at threads.c and see what is being done on Windows. 
No matter how low I set the limit for sick hacks, threads.c always 
manages to slip thereunder.

This isn't the fault of the folk who wrote the threads.s code, they had 
no other choice. Windows thread API design is to blame. This means 
things won't get better, ever.

My advice is, if there is any chance, build libxml without threads and 
do the threading in your programme. Otherwise, if you don't mind using 
pthreads, you can get pthreads for Windows and build libxml with that.

Well, I had no problem when I got the proper definess set. But in a DLL,
that has to be multi-threaded accessed it is quite difficult to use your
own threads. Well at least where I use it, it would require some major
changes, if ever possible. I can life to compile it with the
LIBXML_STATIC_FOR_DLL and I wanted to add it since quite a while to the
windows configure, because it is really essential, if you put the static
library into a DLL and I don't want people out there to mess around with
it forr weeks/months posting some not existing bugs, because they didn't
had that define set.

I should have a patch handy by tomorrow. Maybe tonight (a computer and a
network to set up...and I suck at diffs :P). I will also add the
"cruntime" parameter for libxslt by just merging the libxml code for it
into the libxslt makefile and script. Quite annoying to build it, work
on your program and the next time you link it, you see, that you got the
wrong runtime in your lib :P



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