Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/157.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ Visual Studio 2013专业链接器错误_C++_Visual Studio 2013_Linker - Fatal编程技术网

C++ Visual Studio 2013专业链接器错误

C++ Visual Studio 2013专业链接器错误,c++,visual-studio-2013,linker,C++,Visual Studio 2013,Linker,我真的很想使用VisualStudioProfessional的调试器来查看我在程序中遇到的分段错误。但是,IDE甚至不会编译这样的简单程序: // test_aug.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[

我真的很想使用VisualStudioProfessional的调试器来查看我在程序中遇到的分段错误。但是,IDE甚至不会编译这样的简单程序:

// test_aug.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream> 

using namespace std; 
int _tmain(int argc, _TCHAR* argv[])
{
     cout << "Test" ; 
     return 0;
}
//test\u aug.cpp:定义控制台应用程序的入口点。
//
#包括“stdafx.h”
#包括
使用名称空间std;
int _tmain(int argc,_TCHAR*argv[]
{

cout如果链接器找不到该库,请检查它的存在和/或进入其他库目录

如果不先解决该错误,链接阶段将无法继续

其他两个想法:

  • gd123.lib听起来不对,我相信您想使用gdi32.lib。请确保名称正确

  • 确保已包含在中(速成版不包含)


当我转到目录设置路径时,它会说它已弃用。我是否应该重新安装?gdi32.lib已弃用?你确定吗?无论如何,编译器应该包含它本身,当我转到工具>选项>项目和解决方案>vc++目录时,将其删除,这就是我收到的消息“在工具>选项中编辑VC++目录已被弃用。VC++目录现在作为用户属性页提供,默认情况下添加到所有项目中。”或者删除该库(应自动链接到win32/64应用程序)或者进入项目设置并将正确的路径添加到链接器附加目录。您未通过基本的Hello World测试。有人可能会写一个长长的检查列表,列出您安装VS时可能出现的问题,但这对您来说就像一堆狼吞虎咽的书。基本方法是让您的机器稳定,tr如果可能的话,重新安装幸运轮。