Re: Compile Problem on Visual Studio 2010
| From: | Richard Quadling | Date: | Mon, 25 Oct 2010 14:00:30 +0000 |
| Subject: | Re: Compile Problem on Visual Studio 2010 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-30389@lists.php.net to get a copy of this message | ||
On 25 October 2010 14:16, Steven Scott <chowarmaan@gmail.com> wrote:
> On Fri, Oct 22, 2010 at 4:26 PM, Steven Scott <chowarmaan@gmail.com> wrote:
>> On Fri, Oct 22, 2010 at 3:49 PM, Steven Scott <chowarmaan@gmail.com> wrote:
>>> On Fri, Oct 22, 2010 at 3:15 PM, Pierre Joye <pierre.php@gmail.com> wrote:
>>>> On Fri, Oct 22, 2010 at 7:52 PM, Steven Scott <chowarmaan@gmail.com> wrote:
>>>>
>>>>> I am running Visual Studio 2010, but the changes show:
>>>>
>>>> VC10 works just fine here (many boxes). What do you use? Visual studio
>>>> console or the SDK (7.x includes VC10)? Both work well, but you may
>>>> have messed up your setup (or SDK install broke the paths, early
>>>> versions did that).
>>>>
>>>>
>>>> Cheers,
>>>> --
>>>> Pierre
>>>>
>>>> @pierrejoye | http://blog.thepimp.net |
>>>> http://www.libgd.org
>>>>
>>>
>>> It appears that my environment after a Visual Studio 2010 environment
>>> may be the problem. When running the Windows SDK 6.1 shell, I get:
>>> The x86 compilers are not currently installed.
>>> Please go to Add/Remove Programs to update your installation.
>>> .
>>> Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v6.1
>>> .
>>> Targeting Windows Server 2003 x86 DEBUG
>>>
>>> However, the software is installed and in the path. Running CL though
>>> on its own gives me an error about the mspdb100.dll not being found.
>>> I am going to try to repair my Visual Studio 2010 installation now.
>>>
>>
>> With the extra debug statements:
>> cscript /nologo configure.js "--enable-calendar" "--enable-cgi"
>> "--with-gettext"
>> Saving configure options to config.nice.bat
>> Checking for cl.exe ... Looking ... \cygwin\bin\cl.exe
>> Looking ... \cygwin\usr\local\bin\cl.exe
>> Looking ... no\bin\cl.exe
>> Looking ... \cl.exe
>> Looking ... C:\Program Files\Microsoft Visual Studio 9.0vcpackages\cl.exe
>> Looking ... C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\cl.exe
>> Looking ... C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\cl.exe
>> Looking ... C:\WINDOWS\Microsoft.NET\Framework\v3.5\cl.exe
>> Looking ... C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\cl.exe
>> Looking ... C:\WINDOWS\system32\cl.exe
>> Looking ... C:\WINDOWS\cl.exe
>> Looking ... C:\WINDOWS\System32\Wbem\cl.exe
>> Looking ... c:\Program Files\Microsoft SQL Server\100\Tools\Binn\\cl.exe
>> Looking ... c:\Program Files\Microsoft SQL Server\100\DTS\Binn\\cl.exe
>> Looking ... C:\WINDOWS\system32\WindowsPowerShell\v1.0\cl.exe
>> Looking ... C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl.exe
>> <in default path>
>> C:\php5\source\configure.js(2510, 1) Microsoft JScript runtime error:
>> 'PHP_CL' is undefined
>>
>
> Running the start script you have, I get the following:
>
> The x86 compilers are not currently installed.
> Please go to Add/Remove Programs to update your installation.
> .
> Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v6.1
> .
> Targeting Windows XP x86 RELEASE
>
> I am a little concerned with the first line indicating that the
> compilers are not currently installed when they are. My path also
> gets corrupted so the original path is lost which means that the
> cscript.exe is not located anymore.
>
> My path is corrupted by the
> CALL "C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.Cmd"
>
> Why is the PATH variable referenced with !PATH! instead of %PATH%?
>
%PATH% is expanded at "compiletime" and !PATH! is expanded at "runtime".
So.
@ECHO OFF
SET VAR=
FOR %%A IN (add this to the var) DO SET VAR=%VAR%;%%A
ECHO %VAR%
is not going to do what you think it will.
Outputs ...
;var
@ECHO OFF
SET VAR=
FOR %%A IN (add this to the var) DO SET VAR=!VAR!;%%A
ECHO %VAR%
is better.
Outputs ...
;add;this;to;the;var
But you may need to do ...
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
SET VAR=
FOR %%A IN (add this to the var) DO SET VAR=!VAR!;%%A
ECHO %VAR%
Same output, but you may find you have not got delayed expansion
enabled permanently.
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY