浩哥爱美女 发表于 2013-1-22 17:42:54

执行 link.exe 时出错. hello world.exe - 1 error(s), 0 warning(s)

Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/hello world.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.

hello world.exe - 1 error(s), 0 warning(s)



#include <stdio.h>


void nain()
{
        printf("hello,world! \n");
}


到底哪里错了,求大神解答

空虚寂寞冻 发表于 2013-1-22 17:51:13

是main啊。。。

浩哥爱美女 发表于 2013-1-22 17:52:28

#include <stdio.h>   void nain() {         printf("世界,你好! \n"); }

浩哥爱美女 发表于 2013-1-22 17:52:59

浩哥爱美女 发表于 2013-1-22 17:52 static/image/common/back.gif
#include    void nain() {         printf("世界,你好! \n"); }

这个也是同样的错误

空虚寂寞冻 发表于 2013-1-22 17:58:23

#include <stdio.h>


void main()
{
      printf("hello,world! \n");
}

空虚寂寞冻 发表于 2013-1-22 17:59:17

这种低级错误。。。自己找不同吧:L

浩哥爱美女 发表于 2013-1-22 18:27:20

空虚寂寞冻 发表于 2013-1-22 17:51 static/image/common/back.gif
是main啊。。。

不好意思,粗心了,谢谢哈

wc1363108228 发表于 2021-2-16 11:27:19

#include <stdio.h>
void main()
{
float PI=3.14159;
int s,r=5;
s=r*r*PI;
printf("s=%d\n",s);
}
页: [1]
查看完整版本: 执行 link.exe 时出错. hello world.exe - 1 error(s), 0 warning(s)