【发布时间】:2015-11-16 17:58:43
【问题描述】:
我有几个项目是在 VS 2010 中创建的,但最近已更新到 VS 2015。所有项目都可以编译,但现在其中许多项目在到达 main 之前抛出异常:
'MyApp.exe' (Win32): Loaded 'C:\Users\kloux\Documents\Visual Studio 2010\Projects\BandwidthCruncher\Debug\MyApp.exe'. Symbols loaded.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sysfer.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-timezone-l1-1-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-file-l2-1-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-localization-l1-2-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-synch-l1-2-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-processthreads-l1-1-1.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-file-l1-2-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
Exception thrown at 0x74F4C42D in MyApp.exe: Microsoft C++ exception: std::exception at memory location 0x0032F3EC.
Exception thrown at 0x74A17780 (sysfer.dll) in MyApp.exe: 0xC0000005: Access violation reading location 0x00000010.
我总是可以在结果对话框中选择“继续”,从那时起,应用程序似乎运行没有问题。这些是 GUI 应用程序和控制台应用程序的混合体。这似乎仅限于我从 VS 2010 导入的项目——我从来没有在 VS 2015 中创建的应用程序出现这种情况。
对于其中一个项目,我已经完成了删除所有外部库并将源代码缩减为仅包含以下内容的单个文件的过程:
#include <cstdlib>
int main(int, char**)
{
return 0;
}
我什至取消选中“从父级或项目默认值继承”按钮。这些都没有任何影响 - 我仍然继续得到这个异常。
如果我使用 VS 2010 编译这些项目中的任何一个,问题就会消失——直到我再次使用 VS 2015 编译。在 VS 2015 中,更改平台工具集也无效。
感谢任何帮助。
谢谢!
编辑:当它应该读 VS 2010 时错误地写了 VS 2005
【问题讨论】:
标签: visual-c++ visual-studio-2015