Hi. I'm using exiv2 with mingw32 and mingw64. For reasons that are not clear
to me I get linking errors with mingw64 but not with mingw32. I'm building
and installing the library the same way with both. Any idea what I should
do?
Below is the error that I'm getting:
x86_64-w64-mingw32-g++ -g -D_FORTIFY_SOURCE=2 -Wall -D_FORTIFY_SOURCE=2
-Wall -Wno-format --static -mthreads -o bulk_extractor.exe
bulk_extractor.o threadpool.o context_list.o histogram.o utils.o support.o
base64_forensic.o feature_recorder.o feature_recorder_set.o image_process.o
image_process_fts.o sbuf.o md5.o scan_ccns2.o scan_find.o scan_net.o
scan_wordlist.o scan_exif.o scan_base64.o xml.o scan_zip.o scan_gzip.o
scan_pdf.o scan_aes.o scan_json.o scan_winprefetch.o scan_hiberfile.o
pyxpress.o scan_email.o scan_accts.o scan_kml.o scan_gps.o -lewf -lz
-lpthreadGC2 -lws2_32 -lgdi32 -lexiv2 -lexpat
scan_exif.o: In function `scan_exif':
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:168: undefined
reference to `__imp__ZN5Exiv212ImageFactory4openEPKhl'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:169: undefined
reference to `__imp__ZNK5Exiv25Image4goodEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:202: undefined
reference to `__imp__ZNK5Exiv25Value8toStringEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:204: undefined
reference to `__imp__ZNK5Exiv25Value8toStringEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:214: undefined
reference to `__imp__ZNK5Exiv25Value8toStringEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:217: undefined
reference to `__imp__ZNK5Exiv25Value8toStringEv'
/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:220: undefined
reference to `__imp__ZNK5Exiv25Value8toStringEv'
scan_exif.o:/home/simsong/domex/src/bulk_extractor/src/scan_exif.cpp:223:
more undefined references to `__imp__ZNK5Exiv25Value8toStringEv' follow
scan_exif.o: In function `Exiv2::LogMsg::setLevel(Exiv2::LogMsg::Level)':
/usr/x86_64-w64-mingw32/sys-root/mingw/include/exiv2/error.hpp:116:
undefined reference to `__imp__ZN5Exiv26LogMsg6level_E'
collect2: ld returned 1 exit status
make[2]: *** [bulk_extractor.exe] Error 1
make[2]: Leaving directory `/home/simsong/domex/src/bulk_extractor/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/simsong/domex/src/bulk_extractor'
make: *** [all] Error 2
Here is the usage for the exiv2 configure:
simsong@FC15:~/exiv2-0.22$ ./configure --help
`configure' configures exiv2 0.22 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included
packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root
[PREFIX/share]
--datadir=DIR read-only architecture-independent data
[DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/exiv2]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as
--enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-nls do not use Native Language Support
--disable-rpath do not hardcode runtime library paths
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-dependency-tracking speeds up one-time build
--disable-visibility do not use symbol visibility support
--disable-lensdata do not use the lens database for Nikon lens names
--enable-commercial compile with the EXV_COMMERCIAL_VERSION symbol set
--disable-xmp do not compile XMP support and the XMP Toolkit
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and
DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and
libdir
--with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
--without-libintl-prefix don't search for libintl in includedir and
libdir
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-zlib=DIR root directory path of zlib installation defaults to
/usr/local or /usr if not found in /usr/local
--without-zlib to disable zlib usage completely
--with-expat[=DIR] use libexpat in DIR
Some influential environment variables:
CXX C++ compiler command
CXXFLAGS C++ compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CXXCPP C++ preprocessor
CC C compiler command
CFLAGS C compiler flags
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <ahuggel(a)gmx.net>.
simsong@FC15:~/exiv2-0.22$
simsong@FC15:~/domex/src/bulk_extractor$
And here is the command I'm using to create exiv2:
./configure --host=x86_64-w64-mingw32
--prefix=/usr/x86_64-w64-mingw32/sys-root/mingw --enable-static
--without-libiconv-prefix
Here is the usage for the exiv2 configure: