ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deidre McClain <dmccl...@onboard-software.com>
Subject Ant novice and cpptasks
Date Thu, 16 Oct 2003 14:43:20 GMT
I've just begun to use Ant and my project is to execute a build in Ant of
c++ source code.  I've installed the cpptasks and have the following in my
build file:

<taskdef resource="cpptasks.tasks"/>
<typedef resource="cpptasks.types"/>
<taskdef name="cc" classname="net.sf.antcontrib.cpptasks.CCTask"/>
<typedef name="linker" classname="net.sf.antcontrib.cpptasks.LinkerDef"/>
<typedef name="compiler"
classname="net.sf.antcontrib.cpptasks.CompilerDef"/>

...

<cc name="gcc" debug="true" exceptions="true" incremental="true"
link="static" objdir="${basedir.bld.database.dir}" outfile="fcmsgs.o">
	<compiler name="gcc">
		<fileset dir="${basedir.bld.database.dir}">
			<include name="fcmsgs.c"/>
			<include name="fcmsgs.h"/>
		</fileset>
	</compiler>
	<linker name="gcc"></linker>
</cc>


I get the error message below:

BUILD FAILED
file: D:/OFP/OfpBase/build.xml:233: Could not launch gcc:
java.io.IOException: CreateProcess: gcc -c -g -W
D:\OFP\OfpBase\bld\database\fcmsgs.c error=2
	at net.sf.antcontrib.cpptasks.CUtil.runCommand(CUtil.java:476)
	at
net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler.runCommand(CommandLi
neCompiler.java:269)
	at
net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler.compile(CommandLineC
ompiler.java:226)
	at
net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration.compile
(CommandLineCompilerConfiguration.java:199)
	at net.sf.antcontrib.cpptasks.CCTask.execute(CCTask.java:795)
	at org.apache.tools.ant.Task.perform(Task.java:341)
	at org.apache.tools.ant.Target.execute(Target.java:309)
	at org.apache.tools.ant.Target.performTasks(Target.java:336)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
	at org.apache.tools.ant.Main.runBuild(Main.java:609)
	at org.apache.tools.ant.Main.start(Main.java:196)
	at org.apache.tools.ant.Main.main(Main.java:235)


What does "Could not launch gcc" mean?  How do I get Ant to recognize the
gcc?  Any suggestions would be appreciated.  Thanks.

Deidre R. McClain
Software Engineer 

OnBoard Software, Inc. EMAIL NOTICE  - This transmission may be
confidential. If you are not the intended recipient of this message, you may
not disclose, print, copy or disseminate this information.  If you have
received this in error, please reply and notify the sender (only) and delete
the message. Unauthorized interception of this e-mail is a violation of
federal criminal law.

This communication does not reflect an intention by the sender to conduct a
transaction or make any agreement by electronic means. Nothing contained in
this message or in any attachment shall satisfy the requirements for a
writing, and nothing contained herein shall constitute a contract or
electronic signature under the Electronic Signatures in Global and National
Commerce Act, any version of the Uniform Electronic Transactions Act or any
other statute governing electronic transactions.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message