From: Bill A. <bi...@si...> - 2005-06-30 14:06:22
|
Try this: =20 Start->Programs->Microsoft Visual Studio .NET 2003->Visual Studio.NET = 2003 Tools->Visual Studio .NET 2003 Command Prompt =20 Then run your NAnt build in the that command prompt. =20 VSVars32.bat sets the INCLUDE environment variable so that CL.exe can resolve #includes and the LIB environment variable so that LINK.exe can resolved .libs. It also sets PATH to point to the VC7 binaries so that CL.Exe and LINK.exe can be found. The above command opens a command = prompt and runs VSVars32.bat for you so that the environment is all set up. =20 =20 =20 _____ =20 From: nan...@li... [mailto:nan...@li...] On Behalf Of Pat = Lawrence Sent: Thursday, June 30, 2005 9:45 AM To: Thibaut Barr=E8re Cc: nan...@li... Subject: Re: [Nant-users] newbie question: system cannot find the C++ compiler <cl.exe> Thank you for your help. I tried calling the vsvars32 script and also = tried putting it in the PATH but I couldn't get it to work. I haven't yet graduated from school and am just a new intern here at the office, so = I'm seeing PATH variables for the first time. What I did do was put the=20 C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin; close to the start of my PATH variable and when I call nant, it seems to be finding it--at least, there's no more of that 'cl failed to start'. Was this a valid solution? =20 Unfortunately, it still isn't working. It can't find afxwin.h. This is part of the message I get: =20 [cl] StdAfx.cpp [cl] c:\...\StdAfx.h(15) : fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory =20 afxwin is the first header file called for in my code, so even if I = manually fix the problem for this particular one somehow, it'll probably still = crash on the next one and so on. How do i "tell" it where to find the Visual Studio header files? Should I reinstall and start over? I'm starting = to wonder if maybe I didn't make a big mistake at the beginning and that's = why it's not finding these things. =20 Thanks again for your time. Pat Thibaut Barr=E8re <thi...@gm...> wrote:=20 Hi Pat =20 Maybe calling the vcvars32.bat script in C:\Program Files\Microsoft = Visual Studio .NET 2003\Common7\Tools\vsvars32.bat before starting your script = will solve the issue. =20 This should add the required folders to the PATH to ensure later calls = to cl.exe are successful. =20 regards =20 Thibaut Barr=E8re http://www.dotnetguru2.org/tbarrere =20 2005/6/29, Pat Lawrence <shr...@ya...>:=20 Hello everyone, I was asked to get some automated nightly builds going on several C++ = .NET project that are all pretty huge. =20 I apologize for how basic this question is, but I've been fiddling both = with very simple build files in order to compile just a single .cpp file and = also with the solution task--in both cases, I get a message telling me that = nant cannot find the C/C++ compiler (I think).=20 =20 In the solution case: =20 BUILD FAILED 'cl' failed to start. The system cannot find the file specified. =20 In the simple .cpp build case: =20 BUILD FAILED ... NAnt.Core.BuildException: ... 'cl' failed to start ---> System.ComponentModel.Win32Exception: The = system, cannot find the file specified at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInto startInfo) ...(and a bunch more "at" statements mentioning other [functions?]) =20 I would really appreciate it if someone would tell me what I did wrong. Pat __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around=20 http://mail.yahoo.com <http://mail.yahoo.com/> =20 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around=20 http://mail.yahoo.com=20 |