Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: RFC: Changing Perl Config settings

by Bloodrage (Monk)
on Feb 23, 2008 at 00:36 UTC ( #669692=note: print w/replies, xml ) Need Help??

in reply to Re: RFC: Changing Perl Config settings
in thread Changing Perl Config settings

A simple test script tells me that my $ENV{'INCLUDE'} environment variable is full of directories, which aren't being passed to the compiler via Perl or CPAN... ...I think I need to rewrite my script to build an @include from $ENV{'INCLUDE'}, but this is why I needed meditate on it :)
use strict; use warnings; my @include = @INC; print '@INC =('.(join ",", @include).")\n\n"; print '%INCLUDE%=('.$ENV{'INCLUDE'}.")\n";
Gives the following output:
I:\Documents\Perl\U3 Perl Config scripts>perl @INC =(I:/strawberry/perl/lib,I:/strawberry/perl/site/lib,.) %INCLUDE%=(I:\System\GTK\INCLUDE;I:\System\GTK\INCLUDE\GTK-2.0;I:\Syst +em\GTK\INC LUDE\GLIB-2.0;I:\System\GTK\INCLUDE\PANGO-1.0;I:\System\GTK\INCLUDE\CA +IRO;I:\Sys tem\GTK\INCLUDE\ATK-1.0;I:\System\GTK\INCLUDE\GTKGLEXT-1.0;I:\System\G +TK\LIB\GTK -2.0\INCLUDE;I:\System\GTK\LIB\GLIB-2.0\INCLUDE;I:\System\GTK\LIB\GTKG +LEXT-1.0\I NCLUDE;I:\System\GTK\INCLUDE\LIBGLADE-2.0;I:\System\GTK\INCLUDE\LIBXML +2;I:\straw berry\c\include;I:\strawberry\perl\lib\CORE;\usr\include;C:\System\GTK +\INCLUDE;C :\System\GTK\INCLUDE\GTK-2.0;C:\System\GTK\INCLUDE\GLIB-2.0;C:\System\ +GTK\INCLUD E\PANGO-1.0;C:\System\GTK\INCLUDE\CAIRO;C:\System\GTK\INCLUDE\ATK-1.0; +C:\System\ GTK\INCLUDE\GTKGLEXT-1.0;C:\System\GTK\LIB\GTK-2.0\INCLUDE;C:\System\G +TK\LIB\GLI B-2.0\INCLUDE;C:\System\GTK\LIB\GTKGLEXT-1.0\INCLUDE;C:\System\GTK\INC +LUDE\LIBGL ADE-2.0;C:\System\GTK\INCLUDE\LIBXML2;c:\system\usr\include)

I'm not entirely sure what this is telling me about the relationship of @INC and $ENV{'INCLUDE'}. One seems to be where Perl looks for Perly libraries... which may be set wrong, and the other is as I expect it to be configured and should point the compiler to all the appropriate include directories.

Note: The I:\ prefixed paths have beens set up by my command prompt script, while the C:\ based paths are from my computer's original environment variables.

Replies are listed 'Best First'.
Re^3: RFC: Changing Perl Config settings
by Corion (Patriarch) on Feb 23, 2008 at 08:43 UTC

    @INC is where Perl looks for *.pm files.

    $ENV{INCLUDE} is where the C compiler looks for *.h and *.c files.

    The two bear little to no relation to each other.

      Ya, thanks. I had figured|rememberd that eventually. I'm beginning to think my include library is incomplete (the module Glib-1.164p still won't compile), but my program does seem to help Perl and it's modules find things easier.

      The program's been updated and now uses $ENV{'INCLUDE'} as the source of include directories, so I only have to maintain the include paths list in one place.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://669692]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2022-05-23 10:55 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (81 votes). Check out past polls.