[Ifeffit] Re: Ifeffit Digest, Vol 28, Issue 4

Matt Newville newville at cars.uchicago.edu
Tue Jun 7 10:18:24 CDT 2005


Satyender, 

> Finally i got my Perl script running using,
> 
>    BEGIN {
>          $ENV{IFEFFIT_DIR} = 'C:\Program Files\Ifeffit\';
>        }
> 
> at the begining of my program....

If your perl scripts are running, you must have the Ifeffit
modules installed, no???  If it's working, then it's probably
not necessary to rebuild the perl module.  But if you're going
to be using it heavily, it might be worth figuring out how to do
build it anyway.

> I have added the environment variable IFEFFIT_DIR, but it does
> not seem to make a difference.

Hmm, that's really strange, but maybe I'm not understanding?  
It should definitely work to set IFEFFIT_DIR as an environmental
variable and run perl in that environment without having BEGIN {
$ENV{IFEFFIT_DIR}='...';} in the script.  Well, the BEGIN {}
block in the script is really setting the environmental
variable, so if that works, setting it from the Control Panel
should work to.  Are you should the command shell you're using
has this environmental variable set?  Try typing
  C:\> set 
to see a list of environmental variables.

> I have tried..........
> 
>   "C:\Program Files\Ifeffit\wrappers\perl\build, and do
>     perl Makefile.PL
>     nmake install"
> 
> after editing makefile.pl as per...
> 
> "'LIBS' => [' -LC:\"Program Files"\Ifeffit ifeffit_10 '],"
> and also copied ifeffit.pm to C:\perl\site\lib...
> 
> I have visual studio installed on my computer, however the nmake command
> does not seem to be working.
> 
> SCREEN DISPLAY AFTER THE CHANGES:
> 
> C:\Program Files\Ifeffit\wrappers\perl\build>perl makefile.pl
> Note (probably harmless): No library found for oldnames.lib
> Note (probably harmless): No library found for kernel32.lib
> <snip>

This is probably because the VC/Visual Studio stuff isn't in
your path, and since perl is going to try to run 'cl' and
'nmake' from the command line, the command shell needs to find
them from the environmental variables.  The details of how to do
this depends on how your compiler was installed.  You can
probably start with and edit the batch file below.

Please give more details and a better sense of what does and
doesn't work.  Like, what does

C:\> perl -e "use Ifeffit;" 

report?  If it reports "cant find Ifeffit.pm in @INC ....", you
don't have the Ifeffit module installed. If it reports nothing,
it is installed, and you're ready to go.  If it reports messages
about PGPLOT, you'll be fine once the environmental variables
for PGPLOT_DIR and PGPLOT_DEV are set.

Hope that helps,

--Matt

REM ----
REM sample settings for VC,NMAKE, etc
REM   probably have to reset BASE_DIR
set BASE_DIR=C:\Program Files\Microsoft Visual Studio
set CPU=i386
set INCLUDE=%BASE_DIR%\VC98\INCLUDE
set LIB=%BASE_DIR%\VC98\LIB
set PATH=%BASE_DIR%\Common\Msdev98\BIN;%BASE_DIR%\VC98\BIN;%BASE_DIR%\Common\Tools;%BASE_DIR%\Common\Tools\WINNT;%PATH%

REM ---- 





More information about the Ifeffit mailing list