vendredi 27 février 2015

midl cannot find C preprocessor cl.exe

I am trying to compile my arith.idl file with midl. I am running windows 7 pro.


Here is the command I launch in a powershell prompt:



PS> 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\midl.exe' .\arith.idl

Microsoft (R) 32b/64b MIDL Compiler Version 7.00.0555
Copyright (c) Microsoft Corporation. All rights reserved.
64 bit Processing .\arith.idl
midl : command line error MIDL1005 : cannot find C preprocessor cl.exe
PS>


I am quite a noob at windows RPC programming, I would highly appreciate some help. I have read this but this does not resolve anything (same symptoms). I have also tried specifying the preprocessor cl.exe with this command:



PS C:\> & 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\midl.exe' /cpp_cmd 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe' C:\Users\$e\Desktop\MIDL\arith.idl

Microsoft (R) 32b/64b MIDL Compiler Version 7.00.0555
Copyright (c) Microsoft Corporation. All rights reserved.
Processing C:\Users\philippe.CHIBOLLO\Desktop\MIDL\arith.idl
PS C:\>


This command does not return anything and



echo $?


returns False


EDIT:


The execution of the vcvarsall.bat file does not change anything. Here is the output of the powershell command I launched:



PS C:\> & 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat'
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
PS C:\> & 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\midl.exe' /cpp_cmd 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe' C:\Users\$me\Desktop\MIDL\arith.idl
Microsoft (R) 32b/64b MIDL Compiler Version 7.00.0555
Copyright (c) Microsoft Corporation. All rights reserved.
Processing C:\Users\$me\Desktop\MIDL\arith.idl
PS C:\> echo $?
False
PS C:\>

Aucun commentaire:

Enregistrer un commentaire