Hi Giuseppe,
Thanks for sharing this! It's the first time I see an exiv2 DLL
created on MinGW/MSYS with the existing Makefiles. So far I've only
built DLLs with MSVC.
> gcc-g++-4.2.1-sjlj-2
I managed to also do this with the MinGW g++ 3.4.5 here.
> So I opened an msys shell and configured exiv2 with:
> ./configure --disable-xmp --disable-visibility
>
> It seems like I have to use --disable-visibility to avoid warning
> messages (output by g++) like these:
> warning: visibility attribute not supported in this configuration;
ignored
> Are gcc's visibility attributes an ELF exclusive or are those
> available also for PE targets?
Yes, apparently they are an ELF specific feature.
> I then built exiv2 with:
> make LDFLAGS="-no-undefined -L/usr/local/lib"
> the -no-undefined switch was required so that libtool would be able to
> build the dll. Without it libtool complains with:
> libtool: link: warning: undefined symbols not allowed in
> i686-pc-mingw32 shared libraries
> and builds only the static lib of exiv2.
The -no-undefined flag is something I should add to the autoconf
logic. I'll try to figure out what exactly to test for.
> the -L/usr/local/lib switch was required because otherwise libtool
> wasn't able to find the libraries for libz (aka zlib): in
> C:\msys\1.0\local\lib (mounted in /usr/local/lib) I have the following
> files from the GnuWin32 package of zlib:
> libz.a
> libz.dll (renamed from the zlib1.dll)
> libz.dll.a
An additional option --with-zlib=/usr/local to configure should take
care of this
> The build process completes and I have a working libexiv2-5.dll file
> which I am able to link against.
> Why does libtool appends -5 btw?
That looks like the soversion. On Linux, it installs libexiv2.so.5.2.0
with symlinks libexiv2.so.5 and libexiv2.so
Andreas