Compilation Windows¶
Notes prises de ci de là:Compilation de la libexiv2¶
Télécharger le source: http://www.exiv2.org/exiv2-0.23.tar.gz
Télécharger le source: http://www.exiv2.org/exiv2-0.24.tar.gz
- Installer msys pour avoir les outils ./configure, bash etc.
- Copier le fichier suivant
C:\Qt\2010.05\mingw\lib\gcc\mingw32\4.4.0\libstdc++.a vers C:\Qt\2010.05\mingw\lib\gcc\mingw32\4.4.0\libstdc++.dll.a
- Compiler exiv2:
// export PATH=$PATH:/C/Qt/Qt5.1.1/5.1.1/mingw/bin export PATH=$PATH:C:Qt/2010.05/mingw48_32/bin ./configure --without-zlib --disable-xmp make make install
Sortie configure :
------------------------------------------------------------------ -- Exiv2 0.24 feature configuration summary -- -- Build a shared library......... YES -- Use symbol visibility support.. NO -- PNG image support.............. NO zlib is required for PNG support. Make sure the zlib header files are installed and use --with-zlib=DIR if it is in a non-standard location. You can get zlib from http://www.zlib.net/ -- Native language support........ NO gettext is required for native language support. Make sure the gettext header files are installed. You can get gettext from http://www.gnu.org/software/gettext/ -- Nikon lens database............ YES -- XMP metadata support........... NO Expat is required for XMP support. Make sure the Expat header files are installed and use --with-expat=DIR if it is in a non-standard location. You can get Expat from http://expat.sourceforge.net/ ------------------------------------------------------------------
Erreurs rencontrées :
lib -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4 /../../i686-w64-mingw32/lib -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../li -w64-mingw32/4.8.0/../../.. -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldnam x -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt c:/qt/qt5.1.1/tools/mingw4 ./lib/gcc/i686-w64-mingw32/4.8.0/crtend.o -o .libs/libexiv2-13.dll le-auto-image-base -Xlinker --out-implib -Xlinker .libs/libexiv2.dll.a ../libtool: eval: line 7861: unexpected EOF while looking for matching ../libtool: eval: line 7862: syntax error: unexpected end of file make[1]: *** [lib] Error 1 make[1]: Leaving directory `/home/lenovo/exiv2-0.24/src' make: *** [all] Error 2
Il faut donc corriger le fichier libtool à la main pour supprimer les deux occurences des lignes suivantes:
-L/temp/x32-480-posix-dwarf-r2/libs/lib -L/temp/mingw-prereq/x32-zlib/lib -L/temp/mingw-prereq/i686-w64-mingw32-static/lib -L/temp/x32-480-posix-dwarf-r2/mingw32/opt/lib' -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0 -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/lib/../lib -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../lib -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/lib -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../..
apres:
-Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0 -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/lib/../lib -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../lib -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/lib -Lc:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../..
Ajout de msys.libtool et recompilation
-----------------------------------------------------------------
ça installe exiv2 dans C:\msys\1.0\local\lib
penser ensuite à copier le fichier libexiv2-12.dll dans le répertoire "release" où Qt compile le logiciel sinon on a droit a une erreur au lancement.
Modification du .pro¶
Il faut ajouter la lib exiv2 dans le .pro "pour windows":
win32 { DEFINES += __WINDOWS__=1 INCLUDEPATH += $$quote(C:/msys/1.0/local/include) LIBS += $$quote(C:/msys/1.0/local/lib/libexiv2.dll.a) }
h2. Icham 20141212 -> http://clanmills.com/exiv2/mingw.shtml
* Réinstallation de MinGW avec le devlopper-toolkit (ajoute pkg-config)
Dans une invite de commande windows :
set PATH=c:\MinGW\bin;c:\MinGW\msys\1.0\bin;C:\MinGW\msys\1.0\local\bin; bash