Linker Tools Error LNK1301
Visual Studio 2015
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 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
- Do not compile with /clr or do not link with one of the PGO parameters to /LTCG.
The following sample generates LNK1301:
// LNK1301.cpp
// compile with: /clr /GL /link /LTCG:PGI LNK1301.obj
// LNK1301 expected
class MyClass {
public:
int i;
};
Show: