Sign In
New User? Sign Up
exiv2
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
You can search the group for older messages.

Messages

  Messages Help
Advanced
Build dll of Exiv2 0.18 in MinGW   Message List  
Reply | Forward Message #1484 of 1513 |
Hi Andreas & all,
I downloaded exiv2 v0.18 and I wanted to build a dll in windows using
MinGW/msys.
I'd like to share my results, hoping that someone more fluent in
autotools & company would be able to spot my errors or make the
process more "streamlined".

here's some packages I have installed:
gcc-core-4.2.1-sjlj-2
gcc-g++-4.2.1-sjlj-2
w32api-3.10
binutils-2.17.50-20060824-1
mingw32-make-3.81-2
mingw-runtime-3.13

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?
My g++ was built like this:
$ g++ -v
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.2.1-2-src/configure --with-gcc
--enable-libgomp --host=mingw32 --build=mingw32 --target=mingw32
--program-suffix=-sjlj --with-arch=i486 --with-tune=generic
--disable-werror --prefix=/mingw --with-local-prefix=/mingw
--enable-threads --disable-nls
--enable-languages=c,c++,fortran,objc,obj-c++,ada
--disable-win32-registry --enable-sjlj-exceptions
--enable-libstdcxx-debug --enable-cxx-flags=-fno-function-sections
-fno-data-sections --enable-version-specific-runtime-libs
--disable-bootstrap
Thread model: win32
gcc version 4.2.1-sjlj (mingw32-2)


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 -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

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?

happy new year to y'all
Giuseppe




Fri Jan 2, 2009 3:19 pm

beppe_rota
Offline Offline
Send Email Send Email

Forward
Message #1484 of 1513 |
Expand Messages Author Sort by Date

Hi Andreas & all, I downloaded exiv2 v0.18 and I wanted to build a dll in windows using MinGW/msys. I'd like to share my results, hoping that someone more...
beppe_rota
Offline Send Email
Jan 2, 2009
3:19 pm

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...
Andreas Huggel
zzzahu
Offline Send Email
Jan 5, 2009
3:24 pm

Hi Andreas, and thanks again. Here's a quick follow-up on the --with-zlib=/usr/local thing. ... Oddly enough it did not work out on my system. Here's the...
beppe_rota
Offline Send Email
Jan 5, 2009
9:25 pm

... I can reproduce this. The LDFLAGS setting passed to "make" overwrites that from configure. It works here if I set LDFLAGS in the environment before running...
Andreas Huggel
zzzahu
Offline Send Email
Jan 6, 2009
6:47 am
Advanced

Copyright © 2009 Yahoo! UK. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help