Code: Select all
configure:22506: gcc -o conftest -g -O2 conftest.c -lfreeimage -lpthread -lz -lm -ldl >&5
/usr/local/lib/libfreeimage.a(Plugin.o): In function `PluginList::FindNodeFromMime(char const*)':
Plugin.cpp:(.text+0xa46): undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/usr/local/lib/libfreeimage.a(Plugin.o): In function `PluginList::FindNodeFromFormat(char const*)':
Plugin.cpp:(.text+0xb16): undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/usr/local/lib/libfreeimage.a(Plugin.o): In function `PluginList::~PluginList()':
Plugin.cpp:(.text+0xbbd): undefined reference to `operator delete(void*)'
Plugin.cpp:(.text+0xbc6): undefined reference to `operator delete(void*)'
Plugin.cpp:(.text+0xbce): undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/usr/local/lib/libfreeimage.a(Plugin.o): In function `PluginList::~PluginList()':
Plugin.cpp:(.text+0xc6d): undefined reference to `operator delete(void*)'
Plugin.cpp:(.text+0xc76): undefined reference to `operator delete(void*)'
Plugin.cpp:(.text+0xc7e): undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
Plugin.cpp:(.text+0xcb7): undefined reference to `operator delete(void*)'
/usr/local/lib/libfreeimage.a(Plugin.o): In function `PluginList::AddNode(void (*)(Plugin*, int), void*, char const*, char const*, char const*, char const*)':
Plugin.cpp:(.text+0xd37): undefined reference to `operator new(unsigned long)'
Plugin.cpp:(.text+0xd44): undefined reference to `operator new(unsigned long)'
Plugin.cpp:(.text+0xd7d): undefined reference to `operator delete(void*)'
Plugin.cpp:(.text+0xd85): undefined reference to `operator delete(void*)'
/usr/local/lib/libfreeimage.a(Plugin.o): In function `FreeImage_Initialise':
Plugin.cpp:(.text+0xec6): undefined reference to `operator new(unsigned long)'
/usr/local/lib/libfreeimage.a(Plugin.o): In function `FreeImage_DeInitialise':
Plugin.cpp:(.text+0xc3d): undefined reference to `operator delete(void*)'
/usr/local/lib/libfreeimage.a(Plugin.o): In function `std::_Rb_tree<int, std::pair<int const, PluginNode*>, std::_Select1st<std::pair<int const, PluginNode*> >, std::less<int>, std::allocator<std::pair<int const, PluginNode*> > >::_M_erase(std::_Rb_tree_node<std::pair<int const, PluginNode*> >*)':
Plugin.cpp:(.text._ZNSt8_Rb_treeIiSt4pairIKiP10PluginNodeESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_M_eraseEPSt13_Rb_tree_nodeIS4_E[std::_Rb_tree<int, std::pair<int const, PluginNode*>, std::_Select1st<std::pair<int const, PluginNode*> >, std::less<int>, std::allocator<std::pair<int const, PluginNode*> > >::_M_erase(std::_Rb_tree_node<std::pair<int const, PluginNode*> >*)]+0xcc): undefined reference to `operator delete(void*)'
Plugin.cpp:(.text._ZNSt8_Rb_treeIiSt4pairIKiP10PluginNodeESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_M_eraseEPSt13_Rb_tree_nodeIS4_E[std::_Rb_tree<int, std::pair<int const, PluginNode*>, std::_Select1st<std::pair<int const, PluginNode*> >, std::less<int>, std::allocator<std::pair<int const, PluginNode*> > >::_M_erase(std::_Rb_tree_node<std::pair<int const, PluginNode*> >*)]+0xde): undefined reference to `operator delete(void*)'
Plugin.cpp:(.text._ZNSt8_Rb_treeIiSt4pairIKiP10PluginNodeESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_M_eraseEPSt13_Rb_tree_nodeIS4_E[std::_Rb_tree<int, std::pair<int const, PluginNode*>, std::_Select1st<std::pair<int const, PluginNode*> >, std::less<int>, std::allocator<std::pair<int const, PluginNode*> > >::_M_erase(std::_Rb_tree_node<std::pair<int const, PluginNode*> >*)]+0xf4): undefined reference to `operator delete(void*)'
This error seems to be due to the configure check using gcc instead of g++ and therefore not linking against libstdc++ which FreeImage depends on.
I was able to work around it by adding -lstdc++ to this line:
LIBS="-lfreeimage $LIBS"
I am afraid my knowledge of autotools doesn't currently allow me to switch the check from using gcc to g++ to make it work.
I hope this helps.
Mike
