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 (also called IJW) .obj files with .obj files compiled with /clr:pure.

Example

// 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