zr.
zr.

Reputation: 7788

How to set the path of cl.exe in the .vcproj file

How do i set in the .vcproj file which cl.exe will be invoked to compile the .cpp files in the project? i could not find any such property in the documentation.

i know i could set the 'Path' environment variable and then start devenv.exe with the /USEENV switch, but that is now what i really want to do. I prefer to have the path of cl.exe set in the .vcproj file.

TIA.

Upvotes: 1

Views: 2567

Answers (2)

Craig Wright
Craig Wright

Reputation: 1605

Go to Tools->Options->Projects->VC++Directories->Exectuable Files. Delete everything with environment variables. Add your own variable VC_CL_DIR or whatever. Put it at the top. You might also need to makesure VSINSTALLDIR/Common7/IDE is in there too - for 32-bit.

Set VC_CL_DIR to "c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2/Bin/win64/x86/AMD64" for the AMD64 cl.exe or to "C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Vc7\bin" for x86 cl.exe.

Maybe this helps.

Anyway, I ran across the post today, and the answer did not help me, and this is how I ended up solving my problem. Which was: "how to get a non-interactive build for both a 32-bit and 64-bit target in VC 2003".

Upvotes: 0

Ruddy
Ruddy

Reputation: 1754

I don't think it can be done, interestingly enough I ran across this recently Using Visual Studio 2008 with Visual C++ 6.0 compiler however that does use the /USEENV switch to handle it.

Upvotes: 1

Related Questions