c++ - 调试进程加载异常0xc0000138(Ordinal not found)

标签 c++ visual-studio-2010 visual-c++ dll

enter image description here在 VS2010 上运行我的 VC++ 应用程序时出现以下错误:-

'26aprilmadefromnewfoldercode.exe': Loaded 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\26aprilmadefromnewfoldercode\Debug\26aprilmadefromnewfoldercode.exe', Symbols loaded.
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\26aprilmadefromnewfoldercode\Debug\hdpw32.dll', Binary was not built with debug information.
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\secur32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\user32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', Cannot find or open the PDB file
'26aprilmadefromnewfoldercode.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll', Cannot find or open the PDB file
Debugger:: An unhandled non-continuable exception was thrown during process load
The program '[5800] 26aprilmadefromnewfoldercode.exe: Native' has exited with code -1073741512 

(0xc0000138)。

我的 exe 文件已生成,但未执行。如何调试进程负载或解决此错误?

最佳答案

您不会从中获得堆栈跟踪或转储,因为它似乎在动态库加载期间失败了。您最好的想法是将它加载到 depends.exe 中并查看导入的库和符号,这应该会告诉您找不到哪个。

看看这个问题:

"The specified procedure could not be found" error when running app on Windows XP (exception c0000139)

它展示了如果您尝试链接动态链接时不可用的 API 会发生什么,以及如何使用 depends.exe 调试它。

关于c++ - 调试进程加载异常0xc0000138(Ordinal not found),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10349155/

相关文章:

c++ - cv::createLineSegmentDetector() 函数的 Opencv4nodejs 插件崩溃。异常只能被 catch(...) 捕获。如何调试异常类型?

c++ - 用户调用 operator new 时的分配/对象详细信息拦截和收集问题

c++ - C++类成员的条件布局

visual-studio-2010 - 如何将命令行代码生成器添加到 Visual Studio?

c++ - 遍历数组并找到最接近键的数组元素的最佳方法是什么?

c++ - 错误 LNK2020 : unresolved token (0A000015) IID_IPropertySetStorage

C++ vector 编译错误

visual-studio-2010 - 由于其他依赖库,在 VS2010 中链接 googleTest 导致 LNK2005

visual-studio - 调试 Visual Studio 2010 扩展或插件总是给我 LoaderLock

使用 'asm' 指令编译 c 源代码