Trouble compiling OGRE tutorial example.
I have built and installed Ogre to my Debian with Code::Blocks. Next, I tried to compile a tutorial application but I'm getting these errors:
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 funct开发者_JS百科ion `~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&)'
I have added /usr/local/include/OGRE and /usr/local/lib/OGRE but that did not help. =(
when you compile you have to link OgreMain library to your executable.
精彩评论