On Tue, Nov 24, 2009 at 3:40 AM, Joel Peshkin <j...@peshkin.net> wrote: > > I've been struggling to find a good systematic way to link with multiple > libraries that depend on each other. I have libfirst, libsecond, and > libthird. There are functions in libfirst that are needed by libthird and > there are functions in all 3 that are needed by my inline code. I can build > them as static libraries or shard libraries, though I would prefer to use > the static form. > > If I just specify LIBS => '-L /path/to/libs/ -lfirst -lsecond -lthird', then > the inline code doesn't seem to find them.
One simple, messy way is to specify the -l's twice, e.g. LIBS => '-L /path/to/libs/ -lfirst -lsecond -lthird -lfirst -lsecond -lthird' The problem is that the C-linker only picks the symbols it knows it needs from each library. Listing them twice gives it the right information. -- Lars Balker Rasmussen Consult::Perl