tags:

views:

68

answers:

2

Hi all,

i actually trying to compile an application that uses bfd library (a part of beanutils) using MinGW. I've added the libiconv 1.13 and gettext 0.17 packages to my MinGW directory. If i compile my source including bfd:

$ g++ iftest.cpp -o iftest -llibiconv -lbfd -liberty

This leads to the following linkage error:

c:/binrev/development/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../libbfd.a(libbfd.o):libbfd.c:(.text+0x6ee): undefined reference to `libintl_dgettext'
c:/binrev/development/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../libbfd.a(libbfd.o):libbfd.c:(.text+0x740): undefined reference to `libintl_dgettext'
c:/binrev/development/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../libbfd.a(libbfd.o):libbfd.c:(.text+0x79b): undefined reference to `libintl_dgettext'
c:/binrev/development/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../libbfd.a(libbfd.o):libbfd.c:(.text+0x7d0): undefined reference to `libintl_dgettext'
c:/binrev/development/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../libbfd.a(bfd.o):bfd.c:(.text+0x8fd): undefined reference to `libintl_dgettext'
c:/binrev/development/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../libbfd.a(bfd.o):bfd.c:(.text+0x964): more undefined references to `libintl_dgettext' follow
collect2: ld returned 1 exit status

Any suggestions? Best regards, Christian

A: 

Have you also added libintl? If you don't need relocation (provided by the patched version I've pointed to), I believe it comes as part of the `gettext package.

Alex Martelli
A: 

I've added and extracted the libintl-0.17-1-mingw32-dll-8.tar.lzma to my MinGW directory. By this reason i think the libintl should be part of the libraries. Adding -lintl to the command has no effect, same failures occurs.

Hellhound