__imp__CrtDbgReportW未定义 [英] __imp__CrtDbgReportW undefined
问题描述
我一直在开发一个程序。在调试设置下构建时,它可以编译并运行正常。
I have been developing a program. While building under debug settings, it compiles and runs fine.
我想构建一个发布版本。当我为释放设置所有内容时,链接器报告__imp__CrtDbgReportW未定义。
I want to build a release version. When I set everything for release, the linker reports __imp__CrtDbgReportW being undefined.
我已经更改了从调试到发布的每个设置,但我显然遗漏了一些东西,但我不知道知道什么。
I have changed every setting I can find from debug to release, but I am obviously missing something, but I don't know what.
我们将非常感谢任何线索。
Any clues will be greatly appreciated.
-jimc
推荐答案
将来自
用于报告的宏
这应该消除错误发布版本。 或者,您可以使用#ifdef _DEBUG / #endif预处理程序语句包围调用_CrtDbgReportW的代码。
That should eliminate the error in a release build. Alternatively, you can surround the code that calls _CrtDbgReportW with #ifdef _DEBUG/#endif preprocessor statements .
检查项目的编译器选项预处理器定义。 调试版本将具有_DEBUG,版本构建将包含NDEBUG。
Check the project's Compiler options preprocessor definitions. A debug build will have _DEBUG and a release build will contain NDEBUG.
此外,您可以检查版本构建配置的编译器选项,以确保它们不引用调试版本CRT
Also, you can check the compiler options for the release build configurations to ensure that they don't reference the debug versions of the CRT
这篇关于__imp__CrtDbgReportW未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!