[ant-contrib - Help] Problems with msvc and mingw g++
"SourceForge.net" <[email protected]> Fri, 04 Apr 2008 00:55:23 -0700
| Newsgroups | gmane.comp.java.ant-contrib.devel |
|---|---|
| Message-ID | <[email protected]> |
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4883858
By: daffl
Hi.
I'm new to ant and want to use it with cpptasks for a multi plattform and multi
language project (C++ and Java using JNI) on Unix and Windows but it doesn't
work with the msvc compiler (Visual Studio 2005).
Using mingw also leads to an error message for c++ source code because it always
seems to use the c and not the c++ compiler.
My current build.xml testfile
<project name="hello-world" default="compile-msvc">
<property file="build.properties"/>
<!-- Load Ant tasks and types for cpp compilers from cpptasks.jar (in current
directory) -->
<taskdef resource="cpptasks.tasks">
<classpath>
<pathelement location="cpptasks.jar"/>
</classpath>
</taskdef>
<taskdef resource="cpptasks.types">
<classpath>
<pathelement location="cpptasks.jar"/>
</classpath>
</taskdef>
<target name="compile-msvc">
<cc outfile="test-msvc.exe" name="msvc">
<fileset dir="." includes="main.cpp" />
</cc>
</target>
<target name="compile-gcc">
<cc outfile="test-gcc.exe" name="g++">
<fileset dir="." includes="main.cpp" />
</cc>
</target>
</project>
ant compile-msvc
always leads to
Total time: 1 second
F:\build>ant compile-msvc
Buildfile: build.xml
compile-msvc:
[cc] 1 total files to be compiled.
BUILD FAILED
F:\build\build.xml:16: cl failed with return code -1073741515
Total time: 1 second
and compile-gcc results in some linker errors from the gnu c linker for c++
files (but works with c source).
Is there a way to view the compiler and linker command lines?
Thanks
Daff
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=113701
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone