[xml] Re: static build of libxml2 on windows



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.

Ciao,
Igor




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