共用方式為


連結器工具錯誤 LNK1313

偵測到 ijw/native 模組;無法與純模組連結

備註

目前版本的 Visual C++不支持連結原生或混合 Managed/原生 .obj 檔案與 .obj 使用 /clr:pure編譯的檔案。

編譯 /clr:pure 程式選項在Visual Studio 2015中已被取代,Visual Studio 2017 和更新版本中不支援。

範例

來源檔案 LNK1313.cpp

// LNK1313.cpp
// compile with: /c /clr:pure
// a pure module
int main() {}

來源檔案 LNK1313_b.cpp

// LNK1313_b.cpp
// compile with: /c /clr
// an IJW module
void test(){}

下列範例會產生 LNK1313。

// LNK1313_c.cpp
// compile with: /link LNK1313.obj LNK1313_b.obj
// LNK1313 warning expected