When I try to create libocelot.dylib in OS X, I encounter linker errors against boost. It looks like this is the last step in the build script when it runs the command:
g++ -o .release_build/libocelot.dylib -lstdc++ -dynamiclib [...many *.os files referenced here ...] -L/usr/lib -L.release_build -L. -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt -lGLEW -ldl
This gives a few undefined character errors that look like this:
Undefined symbols for architecture x86_64: "std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)", referenced from: "std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)", referenced from: "std::__detail::_List_node_base::_M_unhook()", referenced from: "std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)", referenced from: "std::__detail::__prime_list", referenced from: "std::_Hash_bytes(void const*, unsigned long, unsigned long)", referenced from: "std::ctype<char>::_M_widen_init() const", referenced from: "_glGetError", referenced from:
Of these, most, but not all, seem to be from boost libraries. When I use nm to check for increasing dylib files, I find that these characters are marked U for undefined:
lib$ nm *.dylib | grep _M_hook U __ZNSt8__detail15_List_node_base7_M_hookEPS0_ U __ZNSt8__detail15_List_node_base7_M_hookEPS0_ U __ZNSt8__detail15_List_node_base7_M_hookEPS0_ U __ZNSt8__detail15_List_node_base7_M_hookEPS0_ U __ZNSt8__detail15_List_node_base7_M_hookEPS0_ U __ZNSt8__detail15_List_node_base7_M_hookEPS0_ lib$ nm *.dylib | grep _M_unhook U __ZNSt8__detail15_List_node_base9_M_unhookEv U __ZNSt8__detail15_List_node_base9_M_unhookEv U __ZNSt8__detail15_List_node_base9_M_unhookEv U __ZNSt8__detail15_List_node_base9_M_unhookEv
And so on. Therefore, for some reason, the characters that the ocelot is looking for are not created in momentum. Any ideas on what I might be doing wrong, or an alternative approach? To increase the build level, I followed the instructions below.
http://www.boost.org/doc/libs/1_48_0/more/getting_started/unix-variants.html