Help - about cc
rdi <[email protected]>
| Newsgroups | gmane.comp.java.ant-contrib.devel |
|---|---|
| Message-ID | <[email protected]> |
when I use ant, I get this error.
Buildfile: build.xml
init:
hello:
[cc] 1 total files to be compiled.
[cc] hello.c
[cc] Starting link
[cc] MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol
_WinMain@16 referenced in function _tmainCrtStatup
[cc] hello.exe : fatal error LNK2230: 1 unresolved externals
BUILD FAILED
this is my build.xml
<?xml version="1.0"?>
<project name="Hello" default="hello" basedir=".">
<taskdef resource="cpptasks.tasks"/>
<typedef resource="cpptasks.types"/>
<target name="init">
<condition property="cc" value="msvc">
<os family="windows"/>
</condition>
<condition property="cc" value="gcc">
<os family="unix"/>
</condition>
</target>
<target name="hello" depends="init">
<cc name="${cc}" outfile="hello">
<fileset dir="." includes="hello.c"/>
</cc>
</target>
</project>
and this is my hello.c
int main()
{
return 0;
}
--
View this message in context: http://www.nabble.com/Help---about-cc-tf3638240.html#a10159544
Sent from the Ant Contrib mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/