Re: [xml] Building libxml2 as a DLL under MinGW MSYS



Hi there,


include/libxml/entities.h
include/libxml/parser.h
  - Added 'LIBXML_DLL_IMPORT' to all function definitions
    for replacement with __declspec(dllimport) or
    __declspec(dllexport) as needed.

That would break the current build with MS compiler. As things fare, that
dllexport while compiling libxml would produce a static library which
reexports all those symbols from the client program. GCC can automatically
export all nonstatic symbols, so I would suggest to either use that feature
or a .DEF file.

include/libxml/tree.h
  - Same as above
  - Replaced
#if defined(WIN32) && (defined(_MSC_VER) || defined
(__BORLANDC__))
    with
#if defined(__WIN32__)
    since MinGW compiler doesn't define either of these.

Neither Borland nor Microsoft #define __WIN32__, so that change would break
both compilers.

include/libxml/xmlversion.h
  - disabled libiconv

That file is autogenerated and modifying it brings nothing. Besides, perhaps
should the user be the one who decides if she needs iconv or not.

I realize that not all of the changes may require
modification so as to not change any already existing
functionality, but as they stand, they comprise a
sufficient set to allow one to build libxml under MSYS.

Unfortunately, these modifications break other platforms.

There is at least one more person who marches under the same banner. I
suggest you and Elisabeth cooperate in making MSYS/mingw work, it would be
the most productive way.

Ciao
Igor




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