Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
set INCLUDE=%BASE%c\include;%INCLUDE% set LIB=%BASE%c\lib;%LIB%


That's interesting. I've noticed that Strawberry sets those two environment variables, but I've never understood why. Afaict, with MinGW (including Strawberry's MinGW), the compiler and linker search those locations by default. In fact, I've unset those 2 envvars, and everything still works fine:
C:\_32\C>set LIB LIB= C:\_32\C>set INCLUDE INCLUDE= C:\_32\C>type try.c #include <stdio.h> int main(void) { printf("Hello from strawberry\n"); return 0; } C:\_32\C>gcc -o try.exe try.c C:\_32\C>try Hello from strawberry C:\_32\C>
Similarly, if I'm building a perl extension using Strawberry Perl, the standard headers and libraries get found fine - even though those 2 envvars are unset. Perhaps those 2 envvars could be useful when it comes to finding headers and libraries that are stored in non-default locations. (I haven't tried that. I prefer to keep LIB and INCLUDE unset, and provide the non-standard locations with the -I and -L switches.)

Update: I've since found time to take a closer look - and I can find no evidence that MinGW and Strawberry Perl take any notice at all of the INCLUDE and LIB environment variables. Visual Studio certainly does ... but not MinGW.

Cheers,
Rob

In reply to Re^2: RFC: Changing Perl Config settings by syphilis
in thread Changing Perl Config settings by Bloodrage

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-18 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found