首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >发布版本出现GLUI运行时错误

发布版本出现GLUI运行时错误
EN

Stack Overflow用户
提问于 2014-08-06 09:55:15
回答 1查看 206关注 0票数 0

我正在使用GLUI开发我的第一个应用程序,我遇到了一些问题。我在Windows7机器上使用Visual Studio2010,并使用glui-2.35。我的应用程序在以调试模式构建时运行良好,但在以发布模式构建时会崩溃并出现运行时错误。调试器中的错误来自glui.cpp函数中的最后一条语句:

代码语言:javascript
复制
void GLUI_Master_Object::set_glutReshapeFunc(void (*f)(int width, int height))
{
  glutReshapeFunc( glui_reshape_func );
  add_cb_to_glut_window( glutGetWindow(), GLUI_GLUT_RESHAPE, (void*) f);
}

我不确定为什么发布版本会崩溃;任何建议都会非常感谢。

EN

回答 1

Stack Overflow用户

发布于 2014-08-20 21:22:12

我不是MSVC++调试和发布模式的专家,但我一直在寻找一些信息,在this website中,一些用户谈论它。

其中一个(@mcdeeiis),在这个页面上说:

代码语言:javascript
复制
...
In a debug build the complete symbolic debug information is emitted to help while debugging applications and also the code optimization is not taken into account. 
While in release build the symbolic debug info is not emitted and the code execution is optimized.
Also, because the symbolic info is not emitted in a release build, the size of the final executable is lesser than a debug executable.

One can expect to see funny errors in release builds due to compiler optimizations or differences in memory layout or initialization. These are usually referred to as Release...

无论如何,请确保GLUI或您的项目所依赖的库也已使用发布模式进行了编译。这可能会带来问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25151129

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档