分享方式:


連結器工具警告 LNK4224

不再支援 選項 ;忽略

備註

指定並忽略了無效且過時的連結器選項。

例如,如果 /comment 指示詞出現在 .obj 中,可能會發生LNK4224。使用已被取代的 exestr 選項,透過批註 (C/C++) pragma 新增 /comment 指示詞。 使用 dumpbin /ALL 檢視 .obj 檔案中的連結器指示詞。

可能的話,請修改 .obj 的來源,並移除 pragma。 如果您忽略此警告,則使用 /clr:pure 編譯的 .executable 可能無法如預期般執行。 Visual Studio 2015 中已淘汰 /clr:pure 編譯器選項,Visual Studio 2017 不支援。

範例

下列範例會產生LNK4224。

// LNK4224.cpp
// compile with: /c /Zi
// post-build command: link LNK4224.obj /debug /debugtype:map
int main () {
   return 0;
}