的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