Re: [xml] HOWTO build libxml2 with minGW & pthreads-win32

I am not Igor but I think I know the reason. So if you don't mind, I'll answer. On Windows
there are several different C runtime libraries and you'll have problems if
       - your library is compiled with C runtime 1;
       - your program is compiled with C runtime 2'
- memory, allocated in library (i.e. runtime 1), is freed by program (i.e. runtime 2). IMHO, most simple solution would be to get LibXML2 sources and re-compile it with minGW by yourself. Another option is to switch to MS Visual Studio and use Igor's binaries.


Michel GOUGET wrote:

Hi Igor,

I think this question is for you.
I am porting from Linux to windows a program using libxml2 and pthreads.
I thought that the most straightforward way would be to use minGW (and more
specifically dev-C++ with gcc 2.95.3-6), and pthreads-win32 (snapshot
2002-03-02, the latest version at , I got the libxml and
iconv libraries from your site and compiled the thing, but got segv the
first time I was using xmlMalloc().
I was able to compile and run successfully a small test program (parse an
xml file); so I suspect that the lib has been built for another threads
package and maybe another compiler/runtime.
It looks like I must get the lib from the CVS tree and recompile it if I
want to do serious work.
So my questions are:
- Is it necessary ?
- If yes, could you give me hints or pointers on how to do it for my
environment before I start reinventing the wheel. Mingw has no
autoconf/automake, so what about defines ?, makefile ?, tricks ?, compiler



xml mailing list, project page
xml gnome org

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