2011-10-06 100 views
0

我已經用Code :: Blocks構建並安裝了Ogre到我的Debian。接下來,我試圖編譯教程應用程序,但我發現這些錯誤:無法編譯OGRE教程示例。

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 /本地/包括/ OGRE和/ usr/local/lib目錄/ OGRE但沒有幫助。 =(

回答

2

在編譯時,你必須庫鏈接OgreMain到您的可執行文件。

+0

http://stackoverflow.com/questions/6498368/ogre-g-compile-time-error – micrub