ERROR: LNK 2019 : unresolved external symbol _imp_CrtDbgReportw in Visual Studio

前端 未结 1 897
迷失自我
迷失自我 2021-01-02 04:03

I have written a program that splits a string when the respective delimiter occurs. But a different error is occurring like :

Error 1   error L         


        
相关标签:
1条回答
  • 2021-01-02 04:24

    CrtDbgReport is defined in debug version of CRT (C Run-time Library). You are most likely building debug configuration but linking against release version of CRT.

    Check Properties -> C/C++ -> Code Generation -> Runtime library.

    Other possibility is that you are building release configuration but have some define that is causing string to be built in debug configuration. The easiest example of this would be:

    #define _DEBUG
    #include <string>
    

    and building your example in release will cause exactly this problem even if the correct runtime library is chosen.

    0 讨论(0)
提交回复
热议问题