編譯器錯誤 C2393
'symbol': 無法在區段 'segment' 中配置每個 appdomain 符號
備註
Visual Studio 2015 中已淘汰 /clr:pure 和 /clr:safe 編譯程序選項,且 Visual Studio 2017 不支援。
使用 appdomain 變數表示您要使用 /clr:pure 或 /clr:safe 進行編譯,而安全或純映射不能包含數據區段。
如需詳細資訊,請參閱 /clr(Common Language Runtime 編譯)。
範例
下列範例會產生 C2393。 若要修正此問題,請勿建立數據區段。
// C2393.cpp
// compile with: /clr:pure /c
#pragma data_seg("myseg")
int n = 0; // C2393