致命错误LNK1112,MS Visual Studio 2012 中的 VC++ 目录位置

fatal error LNK1112, VC++ Directories location in MS Visual Studio 2012?

本文关键字:VC++ 中的 位置 2012 Studio LNK1112 MS Visual 致命错误      更新时间:2023-10-16

这是针对此问题给出的特定答案的问题。在尝试获得Qt 5.0.2 64位版本以在Windows 7,64位PC上的Visual Studio 2012 Microsoft构建我的项目。我怀疑我有一个 32 位版本的库,即使它声称是 64 位版本。无论如何,要说到重点:

在这个答案中: https://stackoverflow.com/a/4364020/2903608 和以下几点: 4. 指路径:

 Tool > Options, Project and Solution > VC++ Directories

但是,在 Visual Studio 2012 Microsoft中,该选项卡包含以下信息:

"VC++ Directories editing in Tools > Options has been deprecated.
VC++ Directories are now available as a user property sheet that is added by default all project. Please click '?' for more information."

不幸的是,无法单击选项卡中的任何内容以访问"更多信息"。因此,我转向Google以获取更多信息,并发现了以下冗长的页面(见底部的项目符号):http://social.msdn.microsoft.com/Forums/vstudio/en-US/a494abb8-3561-4ebe-9eb0-6f644a679862/visual-studio-2010-professional-how-to-add-include-directory-for-all-projects?forum=vcgeneral,我相信我可以用以下问题来总结:我正在寻找的弃用路径是否可以在此处访问:

PROJECT > project_name Properties, Configuration Properties > VC++ Directories

如果是这种情况,我已经尝试修改"可执行文件目录"的条目,但它似乎没有明显效果。即使我用明显无效的选择来破坏该条目,错误消息也没有明显的区别。

同一来源还包含以下建议:

"VC++ Directories are no longer supported in VS2010 through Tools->Options page. 
Instead, VS2010 introduces the user settings file (Microsoft.cpp.<Platform>.users.props) 
to control global settings including Global search path. These files are located at 
$(USERPROFILE)appdatalocalmicrosoftmsbuildv4.0 directory. Upon migration to VS2010, 
the custom settings of VC++ Directories from VS2005 or VS2008 are migrated to these user 
files. These global settings files are imported into all the converted and newly created projects."

但是当我尝试遵循上述路径时,我只能到达\local\Microsoft\,因此这似乎是一条死胡同。

  • 实际上,该页面中链接的博客可能更有用:http://blogs.msdn.com/b/vcblog/archive/2010/03/02/visual-studio-2010-c-project-upgrade-guide.aspx

当我遇到错误时,这是这样做的:

首先,在链接器设置中检查属性选项:链接器>高级>目标计算机>属性>配置属性。如果面向 64 位生成,请选择"MachineX64";如果要生成 32 位生成,请选择"MachineX86"。

有关该主题的更多信息,请点击此处 http://msdn.microsoft.com/en-us/library/21ksa10x.aspx