【问题标题】:Trouble compiling OGRE tutorial example.编译 OGRE 教程示例时遇到问题。
【发布时间】:2011-10-06 08:20:47
【问题描述】:

我已经使用 Code::Blocks 构建并安装了 Ogre 到我的 Debian。接下来,我尝试编译一个教程应用程序,但出现以下错误:

obj/Debug/BaseApplication.o: In function `BaseApplication':
/home/ver/projects/testogre/BaseApplication.cpp:34: undefined reference to `Ogre::StringUtil::BLANK'

/home/ver/projects/testogre/BaseApplication.cpp:34: undefined reference to `Ogre::StringUtil::BLANK'
obj/Debug/BaseApplication.o: In function `~BaseApplication':

/home/ver/projects/testogre/BaseApplication.cpp:45: undefined reference to `Ogre::WindowEventUtilities::removeWindowEventListener(Ogre::RenderWindow*, Ogre::WindowEventListener*)'

/home/ver/projects/testogre/BaseApplication.cpp:47: undefined reference to `Ogre::Root::~Root()'
obj/Debug/BaseApplication.o: In function `BaseApplication::configure()':

/home/ver/projects/testogre/BaseApplication.cpp:56: undefined reference to `Ogre::Root::showConfigDialog()'

/home/ver/projects/testogre/BaseApplication.cpp:60: undefined reference to `Ogre::StringUtil::BLANK'

/home/ver/projects/testogre/BaseApplication.cpp:60: undefined reference to `Ogre::Root::initialise(bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

obj/Debug/BaseApplication.o: In function `BaseApplication::chooseSceneManager()':
/home/ver/projects/testogre/BaseApplication.cpp:73: undefined reference to `Ogre::StringUtil::BLANK'
/home/ver/projects/testogre/BaseApplication.cpp:73: undefined reference to `Ogre::Root::createSceneManager(unsigned short, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

我添加了 /usr/local/include/OGRE 和 /usr/local/lib/OGRE 但这没有帮助。 =(

【问题讨论】:

    标签: c++ linux codeblocks ogre


    【解决方案1】:

    当你编译时,你必须将 OgreMain 库链接到你的可执行文件。

    【讨论】:

      猜你喜欢
      • 2012-05-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-25
      • 2015-10-04
      • 1970-01-01
      • 2022-06-10
      相关资源
      最近更新 更多