小弟初学,还请各位指点,编译时main函数问题,
程序代码:
#include <iostream.h> const float PI = 3.1416; float fCir_L(float); float fCir_S(float); main() { float r,s,l; cout<<"r="; cin>>r; cout<<fCir_L(r); cout<<"\n"; cout<<fCir_S(r); } float fCiir_L(float x) { float z=-1.0; if (x>=0.0) z=2*x*PI; return z; } float fCir_S(float a) { float z=-1.0; if (a>=0.0) z=a*a*PI; return z; }
编译环境是Win 7 64bit
Visual Studio 2010
编译时候给的信息:
1>------ Build started: Project: nimei, Configuration: Debug Win32 ------
1>Build started 2011/6/11 0:13:27.
1>InitializeBuildStatus:
1> Touching "Debug\nimei.unsuccessfulbuild".
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>LINK : error LNK2001: unresolved external symbol _mainCRTStartup
1>c:\users\sirius4simky\documents\visual studio 2010\Projects\nimei\Debug\nimei.exe : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.18
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Google 了一下,说是无法找到main函数,据说在Project Properties里面引用一个库?
没有找到具体的操作,
还有说在linker 里面添加main为入口点,也木有找到这个地方,
请问各位应该怎么解决?