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.
Example
The following sample generates LNK1301:
// LNK1301.cpp
// compile with: /clr /GL /link /LTCG:PGI LNK1301.obj
// LNK1301 expected
class MyClass {
public:
int i;
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for