怎么最简单的都通不过????
我装得是masm32v7,环境设置中我只在autoexec.bat加了SET PATH="%PATH%;c:\masm32\bin\"
然后运行ICZE的例程如下:
.386
.model flat,stdcall
option casemap:none
include c:\masm32\include\windows.inc
include c:\masm32\include\kernel32.inc
includelib c:\masm32\lib\kernel32.lib
include c:\masm32\include\user32.inc
includelib c:\masm32\lib\user32.lib
.data
MsgBoxCaption db "Iczelion Tutorial No.2",0
MsgBoxText db "Win32 Assembly is Great!",0
.code
start:
invoke MessageBox, NULL, addr MsgBoxText, addr MsgBoxCaption, MB_OK
invoke ExitProcess, NULL
end start
我用ml msgbox.asm /c /coff或者ml msgbox.asm /c(两个的最终结果一样)
编译可以通过,产生msgbox.obj,
然后再:
link /subsystem:windows /libpath:e:\masm32\lib msgbox.obj
此时确出错,错误提示如下:
msgbox.obj:warning LNK4033:converting object format from OMF to COFF(无论/coff加否都有这一行)
msgbox.obj:error LNK2001:unresolverd external symbol _MessageBoxA@16
msgbox.obj:error LNK2001:unresolverd external symbol _MessageBoxA@4
LINK:error LNK2001:unresolved external symbol _WinMainCRTStartup
msgbox.exe:fatal error LNK1120:3 unresolved externals
谁能解释一下这些错误行分别代表什么意思?会是哪里出了问题??
还有那个/coff究竟有什么用??什么时候要加,什么时候不要加????
(我在我的masm32v7上一个win32汇编程序都没通过)