From: Greg C. <gch...@sb...> - 2011-01-07 13:13:32
|
On 2011-01-07 10:02Z, Peter Rockett wrote: > On 07/01/11 01:11, Greg Chicares wrote: >> On 2011-01-06 21:15Z, Peter Rockett wrote: [...] >>> etc. In other words, I seem to be missing the libintl library on which >>> libbfd depends? How do I satisfy this (unmentioned) dependency? I have >>> downloaded the libintl DLL from the gettext package with no joy. >> Follow Keith's 2010-04-19T09:01:50Z instructions here: >> http://sourceforge.net/tracker/index.php?func=detail&aid=2988371&group_id=2435&atid=102435 >> | you need to install >> | gettext-0.17-1-mingw32-dev.tar.lzma, and likely also >> | libintl-0.17-1-mingw32-dll-8.tar.lzma, both of which you will find it the >> | MinGW gettext package set on our SF downloads page [...] After >> | installing these, you will then need to add the `-lintl' selector >> | (`-llibintl' would be very, very wrong!) to your command line. >> >> Add '-lintl' every place you have '-lbfd': both >> (1) in the makefile for building mpatrol, and >> (2) in your own makefiles that build binaries which use mpatrol. > > Greg - Thanks! I presume this has come about as a side-effect of changes > with bfd? I haven't looked into it, but I'd suppose that the bfd library has been internationalized for MinGW gcc-4.5; with 4.3, '-lintl' wasn't necessary. > I can follow (1) but not sure I understand the reason for (2). Surely if > you build the mpatrol library, references to the libintl- stuff get > bound in and the dependency on the DLL is added to the library so it > loads on startup... so why is it necessary to link the same thing again > in my programs if I am not explicitly calling the libintl functions? Or > have I misunderstood something? The mpatrol makefile builds both static and shared libraries. The shared libraries are built with '-lbfd -liberty -lintl -limagehlp'. But my test program was linked to the static 'libmpatrol.a', which was built with 'ar' and is just a collection of object files, so it needs the same '-l' options as the mpatrol shared-library build. |