Hi,
In a C environment '-lfoo' will have the linker look for files named
'libfoo.a', 'libfoo.dll.a', 'foo.dll.a', 'libfoo.dll' and 'foo.dll'. And it
will then link to the first one it finds. (Not sure of the search order ...
but I think it's as I've written it.)
However, in a (MinGW-built) Perl environment (eg if I run 'perl Makefile.PL
LIBS="-L. -lfoo') the linker looks only for 'foo.a' and 'libfoo.a'.
Consequently, we sometimes find a need to rename external libraries (most
commonly from *.dll.a to *.a), or to create copies with the .a extension. This can be somewhat tedious.
How might one make the '-l' switch (when used in the perl environment) look
for the '.dll.a' and '.dll' extensions, as well as '.a' ?
Would it be a good idea for such a change to become a standard part of perl ?
Given that all-but-ancient versions of MinGW are quite capable of linking to
MSVC-built '.lib' files, I would like to see '.lib' added to the list as well. (Perhaps that's going too far.)
OTOH, the MSVC compiler is quite capable of linking to '.a' and '.dll.a'
libraries (but not directly to dll's). So maybe MSVC-built perls should be
searching for '.a' and '.dll.a' libraries, as well as '.lib' ?
My main interest is in getting an answer to the first question that I asked - but I'm also interested in comments on the other points/questions raised.
Cheers,
Rob
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.