我需要在 Qt 4 中集成 Ogre 3d。我发现了一些不幸过时的代码和建议。我喜欢这个教程
http://irmatden.developpez.com/tutoriels/qt/integration-ogre-qt/
它适用于 Ogre 1.4.9 (Eihorn),但不适用于最新版本 1.7.0。使用最近的应用程序编译应用程序会导致链接器错误
ogrewidget.o:在函数“OgreWidget::~OgreWidget()”中: ogrewidget.cpp:(.text+0x5b6): 未定义引用 `Ogre::NedPoolingImpl::deallocBytes(void*)' ogrewidget.o:在函数“OgreWidget::~OgreWidget()”中: ogrewidget.cpp:(.text+0x666): 未定义引用`Ogre::NedPoolingImpl::deallocBytes(void*)' ogrewidget.o:在函数“OgreWidget::~OgreWidget()”中: ogrewidget.cpp:(.text+0x6f6): 未定义引用`Ogre::NedPoolingImpl::deallocBytes(void*)' ogrewidget.o:在函数“OgreWidget::initOgreSystem()”中: ogrewidget.cpp:(.text+0x1cfb): 未定义引用`Ogre::NedPoolingImpl::allocBytes(unsigned int, char const*, int, char const*)' ogrewidget.cpp:(.text+0x1dde): 未定义引用 `Ogre::Root::initialise(bool, std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&)' ogrewidget.cpp:(.text+0x2278): 未定义引用`Ogre::Root::createRenderWindow(std::basic_string, std::allocator > const&, unsigned int, unsigned int, bool, std::map, std: :allocator >, std::basic_string, std::allocator >, std::less, std::allocator > >, Ogre::STLAllocator, std::allocator > const, std::basic_string, std::allocator > > , Ogre::CategorisedAllocPolicy > > const*)' ogrewidget.cpp:(.text+0x2c31): 未定义引用`Ogre::NedPoolingImpl::deallocBytes(void*)' ogrewidget.o: 在函数`std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::basic_string, std::allocator > >, std::_Select1st, std::分配器 > const, std::basic_string, std::allocator > > >, std::less, std::allocator > >, Ogre::STLAllocator, std::allocator > const, std::basic_string, std::allocator > >, Ogre::CategorisedAllocPolicy > >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, std::pair, std::allocator > const, std::basic_string, std::allocator > >常量&)': ogrewidget.cpp:(.text._ZNSt8_Rb_treeISsSt4pairIKSsSsESt10_Select1stIS2_ESt4lessISsEN4Ogre12STLAllocatorIS2_NS7_22CategorisedAllocPolicyILNS7_14MemoryCategoryE0EEEEEE10_M_insert_EPKSt18_Rb_tree_node_baseSG_RKS2_[std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::basic_string, std::allocator > >, std::_Select1st, std::allocator > const, std::basic_string, std::allocator > > >, std::less, std::allocator > >, Ogre::STLAllocator, std::allocator > const, std::basic_string, std ::allocator > >, Ogre::CategorisedAllocPolicy > >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, std::pair, std::allocator > const, std::basic_string, std::分配器 > > const&)]+0x40): 未定义引用 `Ogre::NedPoolingImpl::allocBytes(unsigned int, char const*, int,字符常量*)' ogrewidget.cpp:(.text._ZNSt8_Rb_treeISsSt4pairIKSsSsESt10_Select1stIS2_ESt4lessISsEN4Ogre12STLAllocatorIS2_NS7_22CategorisedAllocPolicyILNS7_14MemoryCategoryE0EEEEEE10_M_insert_EPKSt18_Rb_tree_node_baseSG_RKS2_[std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::basic_string, std::allocator > >, std::_Select1st, std::allocator > const, std::basic_string, std::allocator > > >, std::less, std::allocator > >, Ogre::STLAllocator, std::allocator > const, std::basic_string, std ::allocator > >, Ogre::CategorisedAllocPolicy > >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, std::pair, std::allocator > const, std::basic_string, std::分配器 >> const&)]+0x10d): 未定义的对 `Ogre::NedPoolingImpl::deallocBytes(void*)' 的引用 ogrewidget.o: 在函数`std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::basic_string, std::allocator > >, std::_Select1st, std::分配器 > const, std::basic_string, std::allocator > > >, std::less, std::allocator > >, Ogre::STLAllocator, std::allocator > const, std::basic_string, std::allocator > >, Ogre::CategorisedAllocPolicy > >::_M_erase(std::_Rb_tree_node, std::allocator > const, std::basic_string, std::allocator > > >*)': ogrewidget.cpp:(.text._ZNSt8_Rb_treeISsSt4pairIKSsSsESt10_Select1stIS2_ESt4lessISsEN4Ogre12STLAllocatorIS2_NS7_22CategorisedAllocPolicyILNS7_14MemoryCategoryE0EEEEEE8_M_eraseEPSt13_Rb_tree_nodeIS2_E[std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::basic_string, std::allocator > >, std::_Select1st, std::allocator > const, std::basic_string, std::allocator > > >, std::less, std::allocator > >, Ogre::STLAllocator, std::allocator > const, std::basic_string, std ::allocator > >, Ogre::CategorisedAllocPolicy > >::_M_erase(std::_Rb_tree_node, std::allocator > const, std::basic_string, std::allocator > > >*)]+0x47):未定义的引用`Ogre::NedPoolingImpl::deallocBytes(void*)' collect2: ld 返回 1
什么可能导致这种情况,我该如何解决?