寄托天下 寄托天下
查看: 2687|回复: 4

[计算机] 到cs版问一个关于windows编程的小问题,xdjm赐教 [复制链接]

Rank: 2

声望
0
寄托币
164
注册时间
2007-2-22
精华
0
帖子
1
发表于 2007-8-13 18:48:39 |显示全部楼层
从书上抄了一段windows的程序,可以生成obj文件,却无法生成exe文件,用的是vc++6.0编译器,报错是这样:

Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/hellapi.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

hellapi.exe - 2 error(s), 0 warning(s)


到底是怎么回事,希望兄弟姐妹赐教,在线等!
重新上路了,wait for me 兄弟
回应

使用道具 举报

Rank: 2

声望
0
寄托币
164
注册时间
2007-2-22
精华
0
帖子
1
发表于 2007-8-13 19:02:48 |显示全部楼层
cs版的人呢?
不削回答这样的问题吧
重新上路了,wait for me 兄弟

使用道具 举报

Rank: 11Rank: 11Rank: 11Rank: 11

声望
100
寄托币
27004
注册时间
2005-11-3
精华
22
帖子
586

荣誉版主 QQ联合登录 AW活动特殊奖

发表于 2007-8-13 22:47:31 |显示全部楼层
一个project里只能有一个main函数……

我遇到这个问题是因为写了两个main函数……
A bird's pride comes not from the height he soars on,
but from the will and courage to fight storm alone.
A bird's glory comes not from the claim of he can fly,
but from the proof of he eventually teared the sky.

使用道具 举报

Rank: 2

声望
0
寄托币
164
注册时间
2007-2-22
精华
0
帖子
1
发表于 2007-8-13 23:35:34 |显示全部楼层
现在搞清楚了,是一个project的设置问题,其实我自己也猜是这个问题,所以才拿上来问(如果是程序的问题的话,自己就可以搞定)

[ 本帖最后由 lilang1988 于 2007-8-13 23:37 编辑 ]
重新上路了,wait for me 兄弟

使用道具 举报

Rank: 9Rank: 9Rank: 9

声望
477
寄托币
58896
注册时间
2005-4-8
精华
4
帖子
883

Aries白羊座 荣誉版主 QQ联合登录 Golden Apple

发表于 2007-8-15 01:42:16 |显示全部楼层
you can define it in some head files.
Soochow University GTER 群: 17788337 请告知所在学院,恕不接受外校


"Freedom has many difficulties and democracy is not perfect,
but we have never had to put a wall up to keep our people in,
to prevent them from leaving us." --JFK

使用道具 举报

RE: 到cs版问一个关于windows编程的小问题,xdjm赐教 [修改]
您需要登录后才可以回帖 登录 | 立即注册

问答
Offer
投票
面经
最新
精华
转发
转发该帖子
到cs版问一个关于windows编程的小问题,xdjm赐教
https://bbs.gter.net/thread-721738-1-1.html
复制链接
发送
报offer 祈福 爆照
回顶部