的Visual Studio 2012 - LINK :致命错误LNK1181:无法打开输入文件“■/ .obj” 我正在使用VS 2012 !!!!
我已经追踪了这一点。 对我来说,当我尝试构建我的应用程序的x64位版本时,不会发生这种情况。我发现,我的项目.vcxproj有一个“ImportGroup条件”,看起来像这样:
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
我也有一个对我的64位编译,看起来像这样:
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
所以我花了看看这些文件:
Users\??????????\AppData\Local\Microsoft\MSBuild\v4.0
Microsoft.Cpp.Win32.user.props
Microsoft.Cpp.x64.user.props
不同之处在于它们各不相同。 x64基本上是空的,而Win32有三条路径。
Win32版本的部分包含三条路径<ExecutablePath>
,<IncludePath>
和<LibraryPath>
。
我发现删除<ExecutablePath>
路径导致此问题消失。我正在更深入地探索这条路,看看是否有任何东西出现在我身上,但我想我会把它传递出去,以防其他人发现这条路上出了什么问题。
■是U + 25A0黑方块。 – 2010-10-22 20:41:25
这是一个奇怪的文件名! – Donotalo 2010-10-22 20:42:33
@Andreas - 我不知道,我只是复制和粘贴。 @Donotalo,同意了,我没有创建它。看看我的编辑,因为我正在研究这个。 – Les 2010-10-23 02:48:33