See this:
http://sourceforge.net/tracker/index.php?func=detail&aid=1096614&group_id=31
650&atid=402868
The only solution currently is to set INCLUDE and LIB environment variables.
This can be done in the shell before invoking Nant, or you can use this
script task (oringally posted by another list member; sorry, can't remember
who) to do it from within your Nant build file:
<script language="C#" >
<imports>
<import name="System.Runtime.InteropServices"/>
</imports>
<code><![CDATA[
[DllImport("kernel32.dll", SetLastError=true)]
static extern bool SetEnvironmentVariable(string lpName,
string lpValue);
[TaskName("setenv")]
public class SetEnvTask : Task {
private string _name;
private string _value;
[TaskAttribute("name", Required=true)]
public string EnvName {
get { return _name; }
set { _name = value; }
}
[TaskAttribute("value", Required=true)]
public string EnvValue {
get { return _value; }
set { _value = value; }
}
protected override void ExecuteTask() {
Log(Level.Info, "Setting env var {0} to {1}", EnvName,
EnvValue );
if ( ! SetEnvironmentVariable(EnvName, EnvValue) ) {
throw new BuildException(string.Format("Error
setting env var {0} to {1}", EnvName, EnvValue ) , Location);
}
}
}
]]></code>
</script>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Pablo Zurita
> Sent: Monday, January 10, 2005 4:04 PM
> To: [email protected]
> Subject: [Nant-users] NAnt and VC++ options.
>
>
> Hello.
>
> I'm new to NAnt, in fact this is my first day trying it. So far
> everything looks good except for a little problem, I don't know how to
> make NAnt read my VC++ options. In VS I have under
> Options->Projects->VC++ Directories so dirs specified to a few
> libraries that all my project share. The problem is that when I try to
> compile with NAnt, the compile is unable to find those dirs (in fact,
> I don't think the compiler is even aware of those dirs) so the build
> fails. How can I fix this without having to modify the solution of all
> the stuff I'm working on?
>
> Thanks
>
> Pablo.
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Nant-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nant-users
>
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Nant-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users