【发布时间】:2015-03-22 13:58:31
【问题描述】:
我尝试在 Visual Studio 中构建一段简单的代码,但构建过程陷入了无限循环。
代码很简单:
// test.cpp : Defines the entry point for the console application.
//
#include <iostream.h>
using namespace std;
int main(void)
{
cout << "Hi." << endl;
return 0;
}
知道发生了什么吗?
谢谢。
【问题讨论】:
-
您的
stdafx.h中有什么内容?在构建过程中的哪个阶段它会卡住?预处理、编译或链接? -
我现在让代码变得更简单了。它不工作....
-
好的,所以我重写了简单的代码示例。如何找到我们的代码卡在哪个阶段?
-
stdafx.h是一些愚蠢的预编译,VS 在创建新项目时不断推动您添加。我以前见过它造成麻烦。
标签: c++ visual-studio-2010 build projects-and-solutions