游戏开发论坛

 找回密码
 立即注册
搜索
查看: 3562|回复: 3

求助OGRE+MinGWToolbox+Code::Blocks的编译错误问题

[复制链接]

14

主题

345

帖子

376

积分

中级会员

Rank: 3Rank: 3

积分
376
QQ
发表于 2007-8-14 10:48:00 | 显示全部楼层 |阅读模式
网上怎么说这3个装完就能编译OGRE sample了?
一开始我遇到的错误是找不到OgreMain_d,后来我把工程linker的directory改成了OgreSDK/bin/debug就好了

但是又遇到新的链接错误了,如下:
Linking console executable: Debug\ogre_sample.exe
Info: resolving Ogre::ResourceGroupManager:EFAULT_RESOURCE_GROUP_NAME       by linking to __imp___ZN4Ogre20ResourceGroupManager27DEFAULT_RESOURCE_GROUP_NAMEE (auto-import)
Info: resolving Ogre:uaternion::IDENTITY      by linking to __imp___ZN4Ogre10Quaternion8IDENTITYE (auto-import)
Info: resolving Ogre::Vector3::ZERO     by linking to __imp___ZN4Ogre7Vector34ZEROE (auto-import)
Info: resolving Ogre::Math::fDeg2Rad     by linking to __imp___ZN4Ogre4Math8fDeg2RadE (auto-import)
Debug\.objs\main.o: In function `GLOBAL__D_WinMain':
E:/Projects/OGRE_Test/main.cpp:78: undefined reference to `OIS::InputManager::createInputSystem(std::multimap<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >&)'
E:/Projects/OGRE_Test/main.cpp:78: undefined reference to `OIS::InputManager::createInputObject(OIS::Type, bool, std::string const&)'
E:/Projects/OGRE_Test/main.cpp:78: undefined reference to `OIS::InputManager::createInputObject(OIS::Type, bool, std::string const&)'
E:/Projects/OGRE_Test/main.cpp:78: undefined reference to `OIS::InputManager::createInputObject(OIS::Type, bool, std::string const&)'
Debug\.objs\main.o: In function `ZN20ExampleFrameListener27processUnbufferedMouseInputERKN4Ogre10FrameEventE':
c:/OgreSDK/Samples/include/ExampleFrameListener.h.text$_ZN20ExampleFrameListener12windowClosedEPN4Ogre12RenderWindowE[ExampleFrameListener::windowClosed(Ogre::RenderWindow*)]+0x2e): undefined reference to `OIS::InputManager::destroyInputObject(OIS::Object*)'
c:/OgreSDK/Samples/include/ExampleFrameListener.h:(.text$_ZN20ExampleFrameListener12windowClosedEPN4Ogre12RenderWindowE[ExampleFrameListener::windowClosed(Ogre::RenderWindow*)]+0x46): undefined reference to `OIS::InputManager::destroyInputObject(OIS::Object*)'
c:/OgreSDK/Samples/include/ExampleFrameListener.h:(.text$_ZN20ExampleFrameListener12windowClosedEPN4Ogre12RenderWindowE[ExampleFrameListener::windowClosed(Ogre::RenderWindow*)]+0x5e): undefined reference to `OIS::InputManager::destroyInputObject(OIS::Object*)'
c:/OgreSDK/Samples/include/ExampleFrameListener.h:(.text$_ZN20ExampleFrameListener12windowClosedEPN4Ogre12RenderWindowE[ExampleFrameListener::windowClosed(Ogre::RenderWindow*)]+0x6c): undefined reference to `OIS::InputManager::destroyInputSystem(OIS::InputManager*)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
4 errors, 0 warnings

求解决办法 [em20]

7

主题

57

帖子

57

积分

注册会员

Rank: 2

积分
57
发表于 2007-8-14 11:44:00 | 显示全部楼层

Re:求助OGRE+MinGWToolbox+Code::Blocks的编译错误问题

是这样的,你还要手动添加 OIS_d.DLL的link,
如果DEMO用到了CEGUI,还要添加 CEGUIBase_d.dll 和 OgreGUIRenderer_d.dll两个文件到link
(release的话要手动添加release版的DLL)
文件分别在OGRESDK/bin/ 的debug 和 release 目录下

14

主题

345

帖子

376

积分

中级会员

Rank: 3Rank: 3

积分
376
QQ
 楼主| 发表于 2007-8-14 11:47:00 | 显示全部楼层

Re:求助OGRE+MinGWToolbox+Code::Blocks的编译错误问题

好的,已解决

我装的DirectX SDK不够新,有些dll没有,就改成OpenGL渲染了
不知道这两者在编程的时候有什么不一样吗?

7

主题

57

帖子

57

积分

注册会员

Rank: 2

积分
57
发表于 2007-8-14 11:51:00 | 显示全部楼层

Re:求助OGRE+MinGWToolbox+Code::Blocks的编译错误问题

应该没太大问题
只是可能你用DEBUG模式时,DX可能会出错
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-25 11:47

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表