【发布时间】:2012-09-01 08:21:18
【问题描述】:
可能重复:
Visual Studio terminates my console application too fast
我是 Visual Studio C++ 的 100% 新手。我也是 C++ 的新手,到目前为止,我一直使用 netbeans 和 cygwin。今天安装了visual C++ 2012,运行如下简单代码
// HelloWorld.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World" << endl;
}
控制台窗口来了,它来得太快了,我也没有机会看到输出,提到以下内容。
'HelloWorld.exe': Loaded 'C:\Users\yohan\Documents\Visual Studio 2010\Projects\HelloWorld\Debug\HelloWorld.exe', Symbols loaded.
'HelloWorld.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'HelloWorld.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'HelloWorld.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'HelloWorld.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded.
'HelloWorld.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
The program '[3436] HelloWorld.exe: Native' has exited with code 0 (0x0).
我浏览了互联网,有人建议将项目属性 > 配置属性 > 链接器 > 调试选项卡 > 生成调试信息设置为“是”。这已经设置为是,但仍然没有好处。我也计划在这个 IDE 中使用 opencv。所以请帮忙!!!
【问题讨论】:
标签: c++ visual-studio-2010 visual-studio visual-c++ visual-c++-2010