中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » 刚学DOS,极简单的程序却通不过,大家来帮帮我,谢了
作者:
标题: 刚学DOS,极简单的程序却通不过,大家来帮帮我,谢了 上一主题 | 下一主题
lllxx
初级用户




积分 105
发帖 1
注册 2005-3-12
状态 离线
『楼 主』:  刚学DOS,极简单的程序却通不过,大家来帮帮我,谢了

我在C7.00下写了极短的几行代码:
int addint(int x)
{
    return x++;
}
并编译成intlib.obj文件后转到VBDOS下输入指令:
link /information /q intlib.obj , , , vbdosqlb.lib得到结果如下

Microsoft (R) Segmented Executable Linker  Version 5.31.009 Jul 13 1992
Copyright (C) Microsoft Corp 1984-1992.  All rights reserved.

Definitions File [nul.def]: LINK : warning L4045: name of output file is 'intlib.qlb'
**** PARSE DEFINITIONS FILE ****
**** PASS ONE ****
\lib\intlib.lib(intlib.cpp)
\lib\intlib.lib(intlib.cpp)
**** LIBRARY SEARCH ****
vbdosqlb.lib(..\rt\ulstart.asm)
vbdosqlb.lib(\mrt\common\fixups.ASM)
vbdosqlb.lib(..\rt\rtutil.asm)
vbdosqlb.lib(..\rt\rtmint1.asm)
vbdosqlb.lib(..\rt\ultort.asm)
vbdosqlb.lib(..\crt\crt0stub.asm)
vbdosqlb.lib(..\crt\execve.asm)
vbdosqlb.lib(..\rt\erbcproc.asm)
vbdosqlb.lib(..\rt\ulutil.asm)
vbdosqlb.lib(..\rt\error.asm)
vbdosqlb.lib(..\rt\rtmint3.asm)
vbdosqlb.lib(..\crt\freeheap.asm)
vbdosqlb.lib(..\rt\rtenexit.asm)
e:\dos\C700\LIB\SLIBCE.lib(chkstk.asm)
e:\dos\C700\LIB\SLIBCE.lib(chkstk.asm) : error L2025: _STKHQQ : symbol defined more than once
e:\dos\C700\LIB\SLIBCE.lib(chkstk.asm) : error L2025: __aaltstkovr : symbol defined more than once
e:\dos\C700\LIB\SLIBCE.lib(chkstk.asm) : error L2025: __chkstk : symbol defined more than once
**** ASSIGN ADDRESSES ****
  1 segment "_TEXT" class "CODE" length 33fH bytes
  2 segment "_DATA" class "DATA" length 4aH bytes
  3 segment "CONST" class "CONST" length 0H bytes
  4 segment "_BSS" class "BSS" length 0H bytes
  5 segment "XMSSEG" class "CODE" length ad5H bytes
  6 segment "FAR_BSS" class "FAR_BSS" length 0H bytes
  7 segment "FAR_DATA" class "FAR_DATA" length 0H bytes
  8 segment "NULL" class "BEGDATA" length 42b0H bytes
  9 segment "CDATA" class "DATA" length eH bytes
10 segment "XIQC" class "DATA" length 2H bytes
11 segment "XIB" class "DATA" length 0H bytes
12 segment "XI" class "DATA" length 0H bytes
13 segment "XIE" class "DATA" length 0H bytes
14 segment "XPB" class "DATA" length 0H bytes
15 segment "XP" class "DATA" length 0H bytes
16 segment "XPE" class "DATA" length 0H bytes
17 segment "XCB" class "DATA" length 0H bytes
18 segment "XC" class "DATA" length 0H bytes
19 segment "XCE" class "DATA" length 0H bytes
20 segment "XECIB" class "DATA" length 0H bytes
21 segment "XECI" class "DATA" length 0H bytes
22 segment "XECIE" class "DATA" length 0H bytes
23 segment "DBDATA" class "DATA" length eH bytes
24 segment "BC_SAB" class "BC_SEGS" length 0H bytes
25 segment "BC_SA" class "BC_SEGS" length 4H bytes
26 segment "XOB" class "BSS" length 0H bytes
27 segment "XO" class "BSS" length 0H bytes
28 segment "XOE" class "BSS" length 0H bytes
29 segment "NMALLOC" class "BC_VARS" length 2H bytes
30 segment "ENMALLOC" class "BC_VARS" length 2H bytes
31 segment "STACK" class "STACK" length 0H bytes
32 segment "C_ETEXT" class "ENDCODE" length 0H bytes
33 segment "_BSS" class "DATA" length 1eH bytes
**** PASS TWO ****
\lib\intlib.lib(intlib.cpp)
\lib\intlib.lib(intlib.cpp)
vbdosqlb.lib(..\rt\ulstart.asm)
vbdosqlb.lib(\mrt\common\fixups.ASM)
vbdosqlb.lib(..\rt\rtutil.asm)
vbdosqlb.lib(..\rt\rtmint1.asm)
vbdosqlb.lib(..\rt\ultort.asm)
vbdosqlb.lib(..\crt\crt0stub.asm)
vbdosqlb.lib(..\crt\execve.asm)
vbdosqlb.lib(..\rt\erbcproc.asm)
vbdosqlb.lib(..\rt\ulutil.asm)
vbdosqlb.lib(..\rt\error.asm)
vbdosqlb.lib(..\rt\rtmint3.asm)
vbdosqlb.lib(..\crt\freeheap.asm)
vbdosqlb.lib(..\rt\rtenexit.asm)
e:\dos\C700\LIB\SLIBCE.lib(chkstk.asm)
**** WRITING DOS EXECUTABLE ****

There were 6 errors detected
谁告诉我怎么回事啊!可能我根本没弄明白BASIC中怎么调用C的过程?

2005-3-12 00:00
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: