回 帖 发 新 帖 刷新版面

主题:生成Release版本时出现问题

自己用VC++6.0做了个游戏,但是在生成Release版本时却出现了问题!
把Release里的.exe拷出后运行它却发现怪物不见了,其他都没问题.在转换地图时也会出错!而在编译器里调试运行却一切正常.只是调试信息好象提示有个问题如下:
Linking...
LINK : warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF

暗夜惊雷.exe - 0 error(s), 0 warning(s)

大家帮忙啊!!![em18][em18]

回复列表 (共6个回复)

沙发

应该检查下你有没有用memset()和ZeroMemory()等函数进行内存块赋值.如果有,检查下是不是赋值的内存块超过了界限了,我以前也遇到过这个问题,就是memset()越界

板凳

路径问题吧~你最好完全使用相对路径,

3 楼

路径应该是没问题的,估计是程序的内存分配回收的问题,发现有内存泄露.另外我的程序构架比较乱,毛病多数出在这!我决定重新构架,而且尽量少使用动态分配内存.
  我觉得合理地构架和规划程序框架是件很难的事,大家对此有好的建议给我吗?
谢谢各位了!

4 楼

还是不行啊,重新制作后问题依旧啊!没有用memset()和ZeroMemory().我已经上传了,并在本栏目发了新贴"我做的游戏<<暗夜惊雷>>",大家去看下下帮帮我,谢谢啊!

5 楼

all references to 'dynamic-link library' discarded by /OPT:REF

The linker discarded all packaged functions that referenced exports in dynamic-link library. As a result, dynamic-link library is not needed for execution of the image.

You may want to consider removing references to dynamic-link library to speed up the build.

Other occurrences of this warning can occur if an unused function in your code references a .dll export that the linker has discarded. Use /VERBOSE to see which of your functions the linker is discarding and then remove them from your code.

6 楼


[em18][em18][em18]

我来回复

您尚未登录,请登录后再回复。点此登录或注册