我在OGRE3D初學者和我建立OGRE3D MI第一個程序,但是當我試圖編譯程序我得到這個錯誤:錯誤OGRE3D在Linux上
In function `main':
test.cpp:(.text+0x14): undefined reference to `std::allocator<char>::allocator()'
test.cpp:(.text+0x30): undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string(char const*,
std::allocator<char> const&)'
test.cpp:(.text+0x40): undefined reference to `std::allocator<char>::allocator()'
test.cpp:(.text+0x5c): undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string(char const*,
std::allocator<char> const&)'
test.cpp:(.text+0x6c): undefined reference to `std::allocator<char>::allocator()'
test.cpp:(.text+0x88): undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string(char const*,
std::allocator<char> const&)'
,並繼續修復
- 我手動編譯程序:
gcc test.cpp -o test.o test
我的文件測試是這樣的:
#include <Ogre.h>
using namespace Ogre;
int main()
{
Root* root= new Root();
if(!root->restoreConfig())
{
root->showConfigDialog();
root->saveConfig();
}
return 0;
}
如何解決我的問題?
我在使用Debian Wheezy。
版本Ogre3D:1.8
感謝您的回答。
謝謝,它的工作。 –