[ant-contrib - Help] Help - about cc

"SourceForge.net" <[email protected]>
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=4277811
By: nethz

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;
}

______________________________________________________________________
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 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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.