logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Building libxml2 as a DLL under MinGW MSYS: msg#00196

Subject: Re: Building libxml2 as a DLL under MinGW MSYS
Igor Zlatkovic <igor@xxxxxxxxxxxxxxxxxxxx> writes:

> One thing: The name 'LIBXML_DLL_EXPORT' is somewhat misleading. An
> user who has never seen Windows rightfully asks herself what that
> should be. Should this thing ever be used more than now, I would
> urge to rename it to something more understandable, such as
> LIBXML_PUBLIC, for example.

Whatever is good for you.

> Whatever its name, putting it in front of every function's
> declaration is unlikely to happen. Only Windows can profit from this
> and all other platforms would have to endure a header
> uglification. We had discussed about this a while ago. There is a
> hard resistance at least as long as there is an alternative.

See below.

> > The deal is that mingw needs the global *data* to be wrapped with the
> > __declspec(dllexport | dllimport) and to the best of my understanding
> > the functions are not nearly as big of a deal and do not need them.
> 
> Mingw needs (dllexport)? I thought it is the same as MSVC in that
> manner. A DLL can export a variable without (dllexport), but the
> client code such as xmllint cannot import it without
> (dllimport). Functions can be exported an imported without
> these. C++ classes can not be exported without (dllexport) but can
> be imported without (dllimport). What a mess.

You are absolutely correct. My apologies.

I verified this just a little while ago with a test package:

<http://www.soggytrousers.net/repository/hello-0.3.tar.gz>

> Was that a cry or a cheer? :-) Seriously, I appreciate it, but there
> is no need to thank me for that. No sane soul would ever drive the
> support for her own platform with ignorance towards any other
> platform, regardless now small the number of its users. Even if I
> would do that, I would be stopped by the others one way or
> another. Daniel has equally considered your platform, although he
> has absolutely no use for Windows or mingw. That is not a simple
> courtesy, it is our duty, it is what we want, and it is the only way
> we can go no matter what we want. That is the democracy of the Open
> Source and precisely the politics responsible for today's libxml,
> one of the world's very best XML processors... ah cut that crap, is
> the beer cold allready?  It's saturday evening :-)

Daniel honored me by including my "Makefile.mingw" with the 2.4.24
distribution and after I downloaded it I discovered it did not work as
it had with 2.4.23, so I set out to adjust ./configure (etc) so that
it could be built automatically so that there would not be as much
problem in the future for mingw users.

I did not expect it to become a big deal! :-)

Elizabeth


<Prev in Thread] Current Thread [Next in Thread>