我有一段時間可以在2008年編譯的程序。 注意我可以使用cl和Ultimate ++ IDE編譯程序。 這是一個相當大的程序,所以我不打算在這裏發佈。 我無法在Studio中進行編譯。在VS C++中導致「錯誤C2856:#pragma hdrstop不能在#if塊內」?
的錯誤是
1>c:\program files\microsoft visual studio 9.0\vc\include\xstring(1735)
: error C2856: #pragma hdrstop cannot be inside an #if block
這似乎是愚蠢的,因爲沒有hdrstop會在那裏。
預編譯頭文件已關閉。
這就是有:
if (_Mysize < _Off)
_String_base::_Xran(); // _Off off end
if (_Mysize - _Off < _Count)
_Count = _Mysize - _Off;
_Traits_helper::copy_s<_Traits>(_Dest, _Dest_size, _Myptr() + _Off, _Count);
return (_Count);
}
void __CLR_OR_THIS_CALL swap(_Myt& _Right)
{ // exchange contents with _Right <<<<<<<<----------this is the line
if (this == &_Right)
; // same object, do nothing
else if (_Mybase::_Alval == _Right._Alval)
{ // same allocator, swap control information
感謝。
是的,它沒有關閉一個文件,它是問題的一部分。 – Aftershock 2010-02-26 18:18:26
另外,我嘗試了可能與其相關的X64代碼生成。 – Aftershock 2010-02-26 18:19:51