Project

General

Profile

build using MinGW, MSYS and c++/c complier

Added by Mihai Sorin Dobrescu over 11 years ago

Hello,

I try to build exiv2 library using MinGW 4.4.0 with MSYS 1.0.11.
I use the following sequence:

./configure --prefix=/mingw
make
make install

At make stage, I get errors like:

/exiv2/xmpsdk/src/.libs/libxmpsdk.a(WXMPUtils.o):WXMPUtils.cpp:(.text+0x2546): undefined reference to `__cxa_end_catch'
/exiv2/xmpsdk/src/.libs/libxmpsdk.a(WXMPUtils.o):WXMPUtils.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'

I think is it the gcc instead of g++ usage. Am I right?

How could I fix this?

Thanks,
Mike


Replies (3)

RE: build using MinGW, MSYS and c++/c complier - Added by Andreas Huggel over 11 years ago

It should compile and link with g++, not gcc. Can you post a bit more context? The output of the ./configure and make steps would be helpful.

Andreas

RE: build using MinGW, MSYS and c++/c complier - Added by Mihai Sorin Dobrescu over 11 years ago

I use a build folder called 'build', but the results are the same as in the root. Here is the configure:

$ ../configure --prefix=/mingw
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts g... (cached) no
checking how to run the C++ preprocessor... g++ -E
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... (cached) no
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking whether NLS is requested... yes
checking for msgfmt... no
checking for gmsgfmt... :
checking for xgettext... no
checking for msgmerge... no
checking for ld used by GCC... m:/development/installed/msys/1.0/mingw/mingw32/bin/ld.exe
checking if the linker (m:/development/installed/msys/1.0/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking whether NLS is requested... yes
checking for GNU gettext in libc... no
checking for iconv... no, consider installing GNU libiconv
checking for GNU gettext in libintl... no
checking whether to use NLS... no
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... m:/development/installed/msys/1.0/mingw/mingw32/bin/ld.exe
checking if the linker (m:/development/installed/msys/1.0/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking for BSD
or MS-compatible name lister (nm)... /mingw/bin/nm
checking the name lister (/mingw/bin/nm) interface... BSD nm
checking the maximum length of command line arguments... 8192
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for m:/development/installed/msys/1.0/mingw/mingw32/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw/bin/nm output from gcc object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... no
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) no
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (m:/development/installed/msys/1.0/mingw/mingw32/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld used by g++... m:/development/installed/msys/1.0/mingw/mingw32/bin/ld.exe
checking if the linker (m:/development/installed/msys/1.0/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (m:/development/installed/msys/1.0/mingw/mingw32/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (m:/development/installed/msys/1.0/mingw/mingw32/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking for cos in -lm... yes
checking if zlib is wanted... yes
checking for inflateEnd in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for inflateEnd in -lz... (cached) yes
checking zlib in /usr... ok
checking for iconv... (cached) no, consider installing GNU libiconv
checking for ANSI C header files... (cached) yes
checking libintl.h usability... no
checking libintl.h presence... no
checking for libintl.h... no
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking sys/mman.h usability... no
checking sys/mman.h presence... no
checking for sys/mman.h... no
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for pid_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... no
checking whether strerror_r is declared... no
checking for strerror_r... no
checking whether strerror_r returns char *... no
checking for gmtime_r... no
checking for lstat... no
checking for memset... yes
checking for mmap... no
checking for munmap... no
checking for strchr... yes
checking for strerror... yes
checking for strtol... yes
checking for timegm... no
checking whether to enable dependency tracking... yes
checking whether to enable g++ visibility support... yes
checking whether the C++ compiler accepts the -fvisibility-inlines-hidden flag... yes
checking whether to use the lens database for Nikon lens names... yes
checking whether to compile a commercial version of the Exiv2 library... no
checking whether to enable XMP support (requires expat)... yes
checking expat.h usability... yes
checking expat.h presence... yes
checking for expat.h... yes
checking for XML_ParserCreate in -lexpat... yes
configure: creating ./config.status
config.status: creating ./Makefile
config.status: creating ./config/config.mk
config.status: creating ./config/exiv2.pc
config.status: creating ./po/Makefile.in
config.status: creating ./src/doxygen.hpp
config.status: creating ./config/config.h
config.status: executing default-1 commands
config.status: creating ./po/POTFILES
config.status: creating ./po/Makefile
config.status: executing libtool commands

------------------------------------------------------------------
-- Exiv2 0.19 feature configuration summary
--
-- Build a shared library......... YES
-- Use g++ visibility support..... YES
-- PNG image support.............. YES
-- 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........... YES
------------------------------------------------------------------

RE: build using MinGW, MSYS and c++/c complier - Added by Andreas Huggel over 11 years ago

That looks ok, I can't see anything wrong. Can you also post the output of 'make'?

Andreas

    (1-3/3)