Geoffrey Broadwell wrote:
On Tue, 2008-05-27 at 11:29 +0200, Ron Blaschke wrote:
OK, I'll generate the Win32 header list from $ENV{Include}. What is
that set to on your system, so I know what to expect?
Mine currently is:
INCLUDE=C:\usr\include;C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE;C:\Program Files\Microsoft
SDKs\Windows\v6.1\include;C:\Program Files\Microsoft Visual Studio
9.0\VC\Include;C:\Program Files\Microsoft
SDKs\Windows\v6.1\Include;C:\Program Files\Microsoft
SDKs\Windows\v6.1\Include\gl;;C:\Program Files\Subversion
1.4\include;C:\Program Files\ICU\icu-3.8\include;C:\Program
Files\boost\boost_1_34_1
I guess the two important parts are to ignore empty elements (multiple
semicolons in the middle or at the end) and to make sure it works with
spaces. "C:\usr\include" is the place I put headers of smaller
libraries, not any system default.
Hmmm. That brings up several questions/thoughts:
1. It looks like I need to add filtering of empty elements, as you said,
but since I'm dealing with globs I doubt the current situation will
actually break things for you.
True.
2. I haven't tried dealing with spaces, but according to the docs
CORE::glob() will do the Wrong Thing. I'll switch that over to
File::Glob::bsd_glob().
Sounds good.
3. I see that you've got 'Include' and 'INCLUDE' for the name of the
environment variable. Which one is correct, or is %ENV case insensitive
on Windows?
The environment is case insensitive on Windows too. Perl will get the
right one either way. In C<%ENV> the keys are normalized to all
uppercase. Usually, the names are all uppercase in the environment as
well, for example INCLUDE, LIB, PATH. Others are mixed case, e.g.
WindowsSdkDir=C:\Program Files\Microsoft SDKs\Windows\v6.1\
Probably depends which MS developer wrote the stuff.
4. Is the 'C:\Program Files\Microsoft SDKs\Windows\v6.1\Include\gl'
entry always going to be there if the SDK is installed? In other words,
should my globs assume that "$PATH/*.h" will be valid, or do I need to
search for "$PATH/gl/*.h" as well?
I think it's safer to search C<$INCLUDE/gl/*.h> as well. I never
noticed the gl directory before, it might be a recent addition.
Using the Visual Studio 2008 (Express) Command Prompt I get:
INCLUDE=C:\Program Files\Microsoft Visual Studio
9.0\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.1\include;
Visual Studio and the Windows SDK feel like different beasts, only by
accident sharing a similar compiler. ;-)
5. For that matter, what happens in Perl on Windows when a path has a
mix of forward and backward slashes? If this is broken, is it safe to
convert them all to forward slashes? Is "C:/Foo/Bar" valid in Windows
Perl?
Perl can handle it, other programs often as well. Not sure about the
Windows API itself, but I think not. I usually prefer using File::Spec.
Let me know if I can help in any other way. I'm also on #parrot, but
somewhat infrequently.
What is your nick? Mine is japhb.
Sorry, forgot to mention. It's Ron. ;-)
Ron