0
我安裝了彙編語言編程MASM但我有問題,下面的代碼錯誤在大會MASM鏈接「鏈接:額外的操作數」
.586
.MODEL FLAT
.STACK 4096
INCLUDE io.h
.DATA
prompt BYTE "shalgham", 0
.CODE
_main PROC
output prompt
mov eax, 0
ret
_main ENDP
END
鏈接時,我組裝上面的代碼通過命令行的每一件事情是確定的
但是當我想它下面的錯誤鏈接將在命令行
C:\Users\mahdi\Desktop\New folder>ml /c /coff simple.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling: simple.asm
C:\Users\mahdi\Desktop\New folder>link /subsystem:console /entry:main simple.obj
io.obj Kernel32.Lib
link: extra operand `simple.obj'
Try `link --help' for more information.
被打印當我使用Visual Studio 2010以下錯誤將被打印出來。
1>InitializeBuildStatus:
1> Touching "Debug\console32.unsuccessfulbuild".
1>_MASM:
1> Assembling [Inputs]...
1>GenerateTargetFrameworkMonikerAttribute:
1>Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
1>temp.obj : error LNK2001: unresolved external symbol itoaproc
1>temp.obj : error LNK2001: unresolved external symbol atoiproc
1>temp.obj : error LNK2001: unresolved external symbol dtoaproc
1>temp.obj : error LNK2001: unresolved external symbol atodproc
1>temp.obj : error LNK2001: unresolved external symbol inproc
1>temp.obj : error LNK2019: unresolved external symbol outproc referenced in function _main
1>E:\programming\assembly\VS2010_files\console32\Debug\console32.exe : fatal error LNK1120: 6 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:06.14
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
問這個問題,我搜索很但不解決發現
它看起來就像你在你的PATH了GNU'link'的副本某處正在使用而不是微軟的「鏈接」。 – Michael
謝謝你的工作。 –