[xml] Compiling static libs on Win32

Hi all list members

I am relatively new to the GNU toolset and am struggling with compiling a static build of libxml2 (very latest source release 2-2.6.20).

I have managed to compile (using the latest mingw+MSYS) a default configuration. The default as far as I can see is to generate both shared and static libraries - which it does.
This is the command line I use:

./configure --with-zlib=/c/Dev/mingw/MSYS/1.0/local

When I try link my programs to the static lib - it fails complaining about missing references to xmlFree and other very low level libxml functions. I can happily compile and link with the shared DLL though - and all works fine. I have also tried using the "enable-shared=no" option to only generate static libs, but then make fails with missing references.

The other thing that I am confused about is the path I must quote to my zlib.
The configure --help option tells me to provide the path to my zlib - after ages of attempting different path options (ending "/" or not, literals vs relative etc.) I found I had to point the path to "/local" rather that "/local/lib". Is this normal? Is there a standard for path paramaters and whether they should have terminating slashes?

My ideal preference is to compile my own DLL statically to libxml so I can distribute as self-contained a package as possible.

I will do some more testing and gather a list of error messages for a more detailed report - but if anyone has any obvious solutions or build methods in the meanwhile it would be great.

Thanks a lot - libxml looks like a very comprehensive package - with a very discoverable API too!


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