我寫在彙編語言一個簡單的程序,這將簡單地顯示在窗口消息框中7 32位錯誤而聯彙編代碼
.386
.model flat, stdcall
option casemap :none
extrn [email protected] : PROC
extrn [email protected] : PROC
.data
HelloWorld db "Welcome to SecurityTube.net!", 0
MsgTitle db "First MessageBox", 0
.code
start:
mov eax, 0
push eax
lea ebx, MsgTitle
push ebx
lea ebx, HelloWorld
push ebx
push eax
call [email protected]
push eax
call [email protected]
end start
我使用的彙編和連接
ml /c /coff helloworld.asm
link /subsystem:windows /defaultlib:kernel32.lib /defaultlib:user32.lib helloworld.obj
以下命令程序完美組裝。但是,雖然鏈接,我得到這個錯誤:
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
LINK : fatal error LNK1104: cannot open file "kernel32.lib"
爲什麼我得到這個錯誤,以及如何減輕它?
您需要指定庫路徑。 – IInspectable
我該如何設置它? – Rob
[Microsoft宏彙編程序參考](https://msdn.microsoft.com/en-us/library/afzk3475.aspx)是一個很好的開始。 – IInspectable