程序在Debug下没问题一到Release下就运行不了。。。。谁遇过这样的问题?
程序在Debug下没有任何问题,但是一到Release下就会在InitInstance函数的
if(!pMainFrame->LoadFrame(IDR_MAINFRAME))
return false;
上面这句会返回false,导致InitInstance失败,程序退出。。。。
这是为什么?
怎么会在Release下面的时候LoadFrame(IDR_MAINFRAME)失败呢?
在Debug下面是没有问题的。。。。
问题点数:50、回复次数:14Top
1 楼cmx98(尘世中一个迷途小书僮)回复于 2004-05-04 20:18:46 得分 0
近来怪事一箩筐啊Top
2 楼subtop(南来北往)回复于 2004-05-04 20:29:49 得分 0
关注...Top
3 楼opentuxedo(借哥哥的号来试试)回复于 2004-05-04 20:34:23 得分 0
跟踪到LoadFrame函数中去看看到底在哪句上出的问题。Top
4 楼nightfallrove(过儿 明月装饰了你的窗 你装饰了我的梦)回复于 2004-05-04 20:37:54 得分 0
是MDI程序
改了InitInstance里面的东西:
把那个MultiDocTemplate删了
在InitInstance里面创建了好多自己定义的文档模板Top
5 楼wishare(那一年)回复于 2004-05-04 21:11:45 得分 0
所以说我们还是要在RELEASE下写东西千万不要在DEBUG下写。Top
6 楼zhuyie()回复于 2004-05-04 22:44:57 得分 0
这类事情太正常了,Release版调试是很令人头痛的。Top
7 楼nightfallrove(过儿 明月装饰了你的窗 你装饰了我的梦)回复于 2004-05-05 13:52:24 得分 0
opentuxedo(开缝的燕尾服) ( ):
没办法跟踪LoadFrame啊,,,
Debug下没事,,,但Release下不能跟宗调试的。。。。
我把那些文档模板注销了还是不行。。。。
Top
8 楼szclm(IT的民工)回复于 2004-05-05 14:02:23 得分 10
你的MainFrame初始化出现问题,比如MainFrame中的对像初始化出现了异常!
在Debug下对一些可能出现的问题是做了优化的!
你着手看看你的程序中的所有对像初始化!或是一种系统对像的引用,这都是会产生这样的问题!
Top
9 楼FengYuanMSFT((6.4 被封杀)袁峰 http://fengyuancom.spaces.live.com)回复于 2004-05-05 15:07:17 得分 0
You can enable debugging in release mode too. Then you can step through your code.
My impression is that there is a compiler option for debugging and there is a linker option for debugging. Enable both.
Step through your code in release mode.Top
10 楼nightfallrove(过儿 明月装饰了你的窗 你装饰了我的梦)回复于 2004-05-05 15:19:24 得分 0
there is a compiler option for debugging and there is a linker option for debugging. Enable both.
///////////////////////////////
怎么设置,,,
没这样用过。。Top
11 楼comshowboy()回复于 2004-05-05 23:48:41 得分 0
关注……Top
12 楼FengYuanMSFT((6.4 被封杀)袁峰 http://fengyuancom.spaces.live.com)回复于 2004-05-06 04:51:58 得分 40
Enable debugging for release build ( Visual Studio 7 ):
1. Click View on the main menu
2. Solution Explorer.
3. Right moust clik on EXE project.
4. Properties.
5. Configuration Properties / C/C++ / General, change Debug Information Format from Disabled to Program Database.
6. Configuration Properties / Linker / Debug, change Generate Debug info from No to Yes.
7. Perform 5 and 6 for all the LIB and DLL you want to debug in your workspace.
8. Rebuild.
9. Debug your release code.
www.fengyuan.comTop
13 楼nightfallrove(过儿 明月装饰了你的窗 你装饰了我的梦)回复于 2004-05-06 14:15:14 得分 0
谢谢FengYuanMSFT(袁峰)
我的是VC6,我把Project->seting....里面的Debug页的一些设置改了一下
后就没问题了,我也不知道为什么。。。Top
14 楼FengYuanMSFT((6.4 被封杀)袁峰 http://fengyuancom.spaces.live.com)回复于 2004-05-06 14:26:54 得分 0
You may still have uninitialized variable somewhere, or heap/stack corruption.
Add some heap checking code to your program.Top
相关问题
- debug程序不能运行?????
- 100分!求教:Debug换成Release时程序不运行
- 程序在debug时运行正确,在release时出现错误?
- 调试问题,为什麽程序在debug 版下运行正常, 但release 版运行不正常
- 为什么我的程序Debug运行没问题,Release运行的时候出错了?
- 高分请教,程序debug下运行正常.release下运行不正常一般是什么问题啊?
- 为什么我的程序在debug版运行良好,而release版出错?
- 为什么程序的debug版不能运行而release版则可以?
- 请问release版本可运行的程序,改成debug后为何出错?
- 编译成debug程序运行正常,但编译成release程序一执行就退出了




