我們的團隊正在將整個基準從VS2008遷移到VS2012。有超過400個C++項目。這裏是6 C++項目展示有線錯誤,如:從VS2008升級之後,VS2012中的構建項目顯示錯誤
1>------ Rebuild All started: Project: SSLT, Configuration: Release Win32 ------
1> stdafx.cpp
1> ???
1>c1xx : fatal error C1083: Cannot open source file: '???': No such file or directory
1> ??????????????????????????????
1>c1xx : fatal error C1083: Cannot open source file: '??????????????????????????????': No such file or directory
All files which are the parameters of cl.exe seems in wrong encoding, and cl.exe can't find them.
Firstly, i think it must be encode issues of .vcxproj, so i save as other encoding style. But still happens.
Then i re-upgrade these projects with such issue, but always build error.
最後,我改變了項目的平臺工具集回到VS2008,再建通。所以我認爲這不是因爲項目文件編碼格式。在使用2012編譯器時,我不知道他們有什麼問題。這些項目使用2008編譯器不會產生錯誤。正如我從VS2010瞭解到的,項目格式發生了很大變化,所以我找不到任何線索。
你真的看到文件名是'???'還是隻是把它們隱藏起來? – RedX
編譯器也會顯示文件名稱的問題。看到?當文件名包含無法在控制檯的默認編碼中顯示的Unicode字符時,會有些期待。 –
謝謝你的回覆,我今天找到根源。混亂文件名問題的根本原因現在已經清楚了。這是因爲錯誤的預編譯頭文件引用。 –