On May 02, Brian Ingerson wrote:
> 
> I think that LIBS behaviour is non-obvious. I played with it directly this
> morning and could not get it to affect the Makefile. However, I *know* this
> stuff works because I've used it before. So I grabbed an example from the
> Inline::C-Cookbook (the one for Term::Readline) and ran it on a Linux system
> with the NOCLEAN option. Here's the relevant bits from the Makefile:
> 
> (Makefile.PL)
>   'LIBS' => [
>     '-lreadline -lncurses -lterminfo -ltermcap '
>   ],

Ok, this sort of makes sense now.  I can imagine _why_ MakeMaker would
avoid using switches it doesn't understand - to avoid fails in the build
system later down the way.  I ran the NOCLEAN option and saw the logfile
that was mentioned when building the Makefile.

I just wanted a way to specify other object files rather than a library:

LIBS => 'foo.o bar.o baz.o'

but apparently this isn't what it was expecting...

I noticed that unlike INCs, LIBS does _not_ like to see environment
variables or make variables encapsulated in the path.  So:

LIBS => '-L$(HOME)/lib -lfoo' 

will not work nor will $HOME.

Thanks,

-Clint

Reply via email to