首页
社区
课程
招聘
[旧帖] [求助]关于编译的问题,请教 0.00雪花
发表于: 2009-2-6 18:53 4704

[旧帖] [求助]关于编译的问题,请教 0.00雪花

2009-2-6 18:53
4704
一个简单的汇编程序,如下
assume cs:codesg

codesg segment

start:
        mov ax,0123h
        mov bx,0456h
        add ax,bx
        add ax,ax

        mov ax,4c00h
        int 21h
        
codesg ends
end start

该程序用masm5.0的masm和link编译连接都没有问题,但是用masm32中的qeditor打开,然后在菜单中选择编译,连接,为什么连接时会出错?
错误为:LINK : error LNK2001: unresolved external symbol _start1.exe : fatal error LNK1120: 1 unresolved externals
是不是masm32是win32的编译器,需要加include头文件?若不是,又是什么呢?

masm32编译连接信息为:
Assembling: C:\masm32\1.asm
C:\masm32\1.asm(14) : warning A4023: with /coff switch, leading underscore required for start address : start
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

LINK : error LNK2001: unresolved external symbol _start
1.exe : fatal error LNK1120: 1 unresolved externals

[课程]Android-CTF解题方法汇总!

收藏
免费 0
支持
分享
最新回复 (4)
雪    币: 293
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
这个与你的qeditor的配置有关,看一下你的qeditor编译参数是怎么写的。从你的错误信息来看,改成以下内容试一下:

assume cs:codesg

codesg segment

_start:
        mov ax,0123h
        mov bx,0456h
        add ax,bx
        add ax,ax

        mov ax,4c00h
        int 21h
        
codesg ends
end _start
2009-2-6 20:54
0
雪    币: 190
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
好像还是不行,不是头文件的问题吗?看错误提示好像是
2009-2-7 12:52
0
雪    币: 293
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
但是他写的是 LINK : error LNK2001: unresolved external symbol _start
应该是找不到 _start 入口点吧?

这样可以吗?
assume cs:codesg

codesg segment

start:
        mov ax,0123h
        mov bx,0456h
        add ax,bx
        add ax,ax

        mov ax,4c00h
        int 21h
        
codesg ends
end start
2009-2-7 13:21
0
雪    币: 190
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
不好意思,程序贴错了,是有start的,我后来加上去了,才报这个错误
2009-2-8 02:07
0
游客
登录 | 注册 方可回帖
返回
//