>Is there some setting or property I need to set in order for the cl.exe to pick up the predefined headers?
 
No, not a property, an environment variable. You need to set INCLUDE. I find vcvars32.bat to be useful for getting INLUDE, LIB, and PATH out of the way in one call with little effort or thought.
 
You can use nant properties to set environment variables if you wish though. Read/set "sys.env" variables. Just be careful. I don't recommend this on Windows, since in nant, the names of the environment variables are case sensitive, and on different Windows systems, they can indeed vary in case. (Path vs. PATH, for example.) You have to cover all of your bases if you choose to go this route.
 

Thanks,
Melissa

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dipak, Ajit
Sent: Tuesday, May 09, 2006 7:34 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] <solution> task - Fails on VC++ project (vcproj)

Hello all,

I'm attempting to use the <solution> task with a solution that has 6 C# projects (*.csproj) and 1 Managed C++ project (*.vcproj).  Note that the solution file compiles without issue in the VS.NET 2003 IDE.

The NAnt build however, produces

[cl] c:\mybuilds\src\MyProjects\MyClass.cpp(6) : fatal error C1083: Cannot open include file: 'iostream': No such file or directory 

[cl] Generating Code...
BUILD FAILED
External Program Failed: cl (return code was 2)


The <solution> task in my build script is quite straightforward


<solution solutionfile="${SourceFolder}\${SolutionFileName}" outputdir="${AssemblyOutputFolder}" configuration="${SolutionConfig}">

        <excludeprojects>
                <include name="${SourceFolder}\**\*.dbp" />
        </excludeprojects>
</solution>


Is there some setting or property I need to set in order for the cl.exe to pick up the predefined headers?


--Ajit

 
 
This message, including any attachments, is intended only for the use of the individual(s) to which it is addressed and may contain information that is privileged/confidential.  Any other distribution, copying or disclosure is strictly prohibited.  If you are not the intended recipient or have received this message in error, please notify us immediately by reply e-mail and permanently delete this message including any attachments, without reading it or making a copy.

Reply via email to