Jochen Wiedmann <[EMAIL PROTECTED]> writes:
>Hi,
>
>assuming I have to link against a library bar, which is located
>in directory foo, it may well happen that the following files
>exist:
>
>            foo/libbar.so
>            foo/libbar.a
>
>If I use MakeMaker with
>
>    LIBS="-Lfoo -lbar"
>
>this will of course work, but use the dynamic library. However,
>in some situations I want to force use of the static library.
>I would like to do this with either of
>
>    LIBS="foo/libbar.a"
>    LIBS="-Lfoo -llibbar.a"
>
>or something similar, but everything fails, because MakeMaker
>refuses the respective argument with "libbar.a" and removes it
>from the option list.
>
>
>Any suggestions?

As far as I know MakeMaker is right to reject -llibbar.a as most linkers
would as well. e.g. GNU ld you specify this by adding -Bstatic before 
-lbar. (And you normally get the -Bstatic in the list with -Wl,-Bstatic 
to gcc.) But sadly MakeMaker also throws out those arguments as well.

I have resorted to override in Makefile.PL that puts the -Wl,-Bstatic 
back in. 



>
>
>Regards,
>
>Jochen
-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/

Reply via email to