D:\masm5\Chapter02\Test>nmake
WARNING: missing nmake.err; displaying error numbers without messages.
Link /subsystem:windows Test.obj Test.res
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
Test.obj : warning LNK4033: converting object format from OMF to COFF
Test.obj : error LNK2001: unresolved external symbol _MessageBoxA@16
Test.obj : error LNK2001: unresolved external symbol _wsprintfA
Test.obj : error LNK2001: unresolved external symbol _ExitProcess@4
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
Test.exe : fatal error LNK1120: 4 unresolved externals
NMAKE : U1077:
Stop.
为什么会出错啊?
D:\masm5\Chapter02\Test>nmake
WARNING: missing nmake.err; displaying error numbers without messages.
Link /subsystem:windows Test.obj Test.res
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
Test.obj : warning LNK4033: converting object format from OMF to COFF ;你的Obj文件不是coff格式文件?请在ml编译时使用/coff参数。
;下面几个错误是你没有将Kernel32.lib和User32.lib库文件包含进去。用:
Includelib x:\masm32\lib\Kernel32.lib ;和
Includelib x:\masm32\lib\User32.lib包含进去就行了。
Test.obj : error LNK2001: unresolved external symbol _MessageBoxA@16
Test.obj : error LNK2001: unresolved external symbol _wsprintfA
Test.obj : error LNK2001: unresolved external symbol _ExitProcess@4
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup ;这个函数是自己定义的吧?将包含这个函数的库文件也用Includelib包含进去就行了。
Test.exe : fatal error LNK1120: 4 unresolved externals
NMAKE : U1077:
Stop.
为什么会出错啊?