windows - 将 MASM 程序与链接导致错误加载 mspdbcore.dll(错误代码 : 193)

标签 windows assembly linker masm masm32

Linking MASM-program with link results in error to load mspdbcore.dll (error code: 193)

在 Visual Studio 2015 中构建汇编程序时没有问题。但是,手动执行这些步骤会产生如下所示的链接器错误。

我已经在系统的VC目录下找到了mspdbcore.dll,并将这个目录添加到Path中,但是并没有解决问题。

我似乎找不到问题所在,我希望有人能够指导我朝着正确的方向前进。

系统为Windows 10 64位版本。

C:\Users\nlykkei\Desktop>ml /c /coff Hello.asm
Microsoft (R) Macro Assembler Version 14.00.23506.0
Copyright (C) Microsoft Corporation.  All rights reserved.

 Assembling: Hello.asm

C:\Users\nlykkei\Desktop>link /subsystem:windows /defaultlib:kernel32.lib /defaultlib:user32.lib Hello.obj
Microsoft (R) Incremental Linker Version 14.00.23506.0
Copyright (C) Microsoft Corporation.  All rights reserved.

LINK : fatal error LNK1171: unable to load mspdbcore.dll (error code: 193)

Hello.asm 程序:

.386
.model flat, stdcall

.stack 4096

extrn MessageBoxA@16 : PROC

ExitProcess PROTO, dwExitCode:DWORD

.data 
MsgBoxCaption db "Win32 Assembly", 0
MsgBoxText db "Hello World!", 0

.code
Hello_ PROC
    push 0
    push offset MsgBoxCaption
    push offset MsgBoxText
    push 0
    call MessageBoxA@16

    INVOKE ExitProcess, 0
Hello_ ENDP
END Hello_

最佳答案

如果您确实在正确的位置拥有 mspdbcore.dllmspdb140.dll 文件,并且您的路径显示正确。

不知何故我的系统正在拉这个 PATH=".;D:\\p4\\dk\\win\\VC\\14.14.26428\\bin\\HostX86" 而不是固定的: PATH=".;D:\\p4\\dk\\win\\VC\\14.14.26428\\bin\\HostX64"

尝试重新启动您的计算机,因为奇怪的是,这在拔掉我的头发一个小时后解决了我的问题。

关于windows - 将 MASM 程序与链接导致错误加载 mspdbcore.dll(错误代码 : 193),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38291030/

相关文章:

java - 运行多个 Apache tomcat 实例在我的电脑上不起作用

windows - 管道在 git for windows 中的 bash 中返回空字符串

gcc - 使用较旧的 libc 进行编译(未找到版本 `GLIBC_2.14')

c++ - makefile 链接不起作用(尽管没有错误消息)

linker - n 处的成员不是 ELF 对象

c++ - 如何设置在 Windows 上使用 CreateProcess 创建的新进程的主线程的堆栈大小?

php - 通过网络从共享文件中读取数据

assembly - 如何在 asm 中为 MOS 6502 创建延迟

assembly - 使用 int 21h, 2Ch 显示系统时间

assembly - x86 操作码编码 : sib byte