Linker Tools Error LNK1301

LTCG clr modules found, incompatible with /LTCG:parameter

A module compiled with /clr and /GL was passed to the linker along with one of the profile guided optimizations (PGO) parameters of /LTCG.

Profile guided optimizations are not supported for /clr modules.

For more information, see:

To correct this error

  1. Do not compile with /clr or do not link with one of the PGO parameters to /LTCG.

Example

The following sample generates LNK1301:

// LNK1301.cpp
// compile with: /clr /GL /link /LTCG:PGI LNK1301.obj
// LNK1301 expected
class MyClass {
public:
   int i;
};