I am creating a project in Visual C ++ 2008, which is an example of an MFC-based application for the C ++ static class library, which I will use in my own project soon. When creating a Debug configuration, I get the following:
warning LNK4098: defaultlib 'MSVCRT' conflicts with other libs; use / NODEFAULTLIB: library
After using the recommended option (adding "msvcrt" in the "Ignore specific library" field in the project linker settings for the Debug configuration), the program communicates and works normally. However, I would like to know why this conflict arose, why I should ignore the critical library, and if I expect problems later, I will add ignore, or what happens if I do not (because the program doesn’t care).
At the same time, the Release configuration warns:
warning LNK4075: ignoring "/ EDITANDCONTINUE" due to the specification / OPT: ICF
warning LNK4098: defaultlib 'MSVCRTD' conflicts with other libs; use / NODEFAULTLIB: library
I assume that the suffix "D" means that this is a debug version of the vC ++ runtime, I don’t know why this is used this time. Anyway, adding "msvcrtd" to the ignore field causes many link errors in the form:
error LNK2001: unresolved external symbol __imp ___ CrtDbgReportW
Any insight is greatly appreciated.
source
share