Linker Tools Error LNK1313

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Linker Tools Error LNK1313.

ijw/native module detected; cannot link with pure modules

The current version of Visual C++ does not support linking native or mixed managed/native .obj files with .obj files compiled with /clr:pure.

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

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

The following sample will generate LNK1313.

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

Show: