【发布时间】:2016-04-03 21:53:21
【问题描述】:
这是我第一次使用 C++ 和 Visual Studio 社区(我只学过 Java 课程并使用过 Eclipse),只是想尝试使用 Visual Studio 社区打印到控制台,但遇到了麻烦。
这是我的调试输出:
'HelloWorld.exe' (Win32): Loaded 'E:\Programming\C++Projects\HelloWorld\Debug\HelloWorld.exe'. Symbols loaded.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\apphelp.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140d.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.
'HelloWorld.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel.appcore.dll'. Cannot find or open the PDB file.
The thread 0x10c8 has exited with code 0 (0x0).
The thread 0x1a98 has exited with code 0 (0x0).
The thread 0x1380 has exited with code 0 (0x0).
The program '[1592] HelloWorld.exe' has exited with code 0 (0x0).
这是我的实际代码:
// HelloWorld.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream"
#include "sstream"
using namespace std;
int main()
{
cout << "Hello world.";
return 0;
}
我查了其他人的问题也有相同的PDB文件问题,共识似乎只是“不用担心,这是为了调试”。这很好,但我仍然不知道为什么我没有看到“Hello world”。打印在任何地方。我也尝试过以管理员身份运行 Visual Studio,如果这意味着什么的话。
我使用 Avast 并尝试关闭屏蔽,就像这篇文章所说:My programs are blocked by avast anti-virus 我还将整个文件夹 'E:\Programming\*' 添加到排除项中。
但命令提示符仍然只弹出一秒钟,然后在我看到任何内容之前关闭。据我所知,Avast 并没有通知它也阻止了任何东西。
【问题讨论】:
-
您是否正在运行 Avast Antivirus?
-
是的,我正在使用 Avast!
-
那么副本就是合适的。
-
我不这么认为。我再次编辑了我的帖子。我禁用了avast,它仍然给我同样的结果。
-
哦,现在您已经添加了重要的细节!它是其他东西的副本。我不能再次关闭它:(stackoverflow.com/q/1775865/560648
标签: c++ visual-studio