There's more than one way to do things | |
PerlMonks |
Re: Re: Re: .bat and perl mysteryby jsprat (Curate) |
on Jun 12, 2002 at 17:57 UTC ( [id://173944]=note: print w/replies, xml ) | Need Help?? |
As you've found out, you can't set environment variables in the parent process. When you try, you spawn a new command process, set the environment variable and exit that process, losing whatever changes you made (see perldoc -q environment or here). What you can do is use the %ENV hash to set the environment before using VS to build your project. I can't remember what vcvars32.bat sets, but something like this: $ENV{LIB}='D:\VCDIR\LIB;' . $ENV{LIB} should work, as long as it is set before you begin the build.
In Section
Seekers of Perl Wisdom
|
|