From: Marcelo Juchem (juchem_at_[hidden])
Date: 2005-11-17 23:53:47


Hi,

    I had some problems when trying to build boost-jam under WinXP SP2
with MSVC7.1. I searched the boost mailing list and found this
message:

"I have MS VC++ 7.1 installed to the default location (C:\Program
Files\Microsoft Visual Studio .NET 2003), O/S WinXPSP2
However, when I run Build.bat from the command line, it returns "
\Utilities\Bin\x86 was unexpected at this time."
This occurs if I let the script auto-detect and also if I specify the
toolset as vc7.
Can someone please steer me in the right direction?

regards

Chris Ward"

    By debbuging the build.bat script, I could figure out what the
problem is. It seems to be a problem with PATH environment variables
that contains parenthesis '(' or ')'.

This is the PATH I had when the problem occurred:
"PATH=C:\Program Files\Microsoft DirectX 9.0 SDK (October
2005)\Utilities\Bin\x86;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\cygwin\bin;C:\Program
Files\Common Files\GTK\2.0\bin;C:\Program Files\Microsoft Visual
Studio .NET 2003\Vc7\bin"

    Just by removing "C:\Program Files\Microsoft DirectX 9.0 SDK
(October 2005)", the build.bat script started working perfectly.
    This is caused because all the variables are expanded inline in a
.bat file, so the parenthesis are understood as scope delimiters and
messes up with the if () statements as in:

    if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
        set PATH=%BOOST_JAM_TOOLSET_ROOT%Other Metrowerks
Tools\Command Line Tools;%PATH%)

This code is expanded as

    if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
        set PATH=c:\Program Files\Microsoft Visual Studio .NET
2003\Common7\Tools\\..\..\VC7\Other Metrowerks Tools\Command Line
Tools;C:\Program Files\Microsoft DirectX 9.0 SDK (October
2005)\Utilities\Bin\x86;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\cygwin\bin;C:\Program
Files\Common Files\GTK\2.0\bin;C:\Program Files\Microsoft Visual
Studio .NET 2003\Vc7\bin)

what leaves the script broken.

    I hope I could be able to make myself clear when trying to explain this.
    A quick workaround is to remove paths that contains parenthesis
from the PATH environment variable, before running the script.

    Thanks,

Marcelo Juchem