When I'm linking program_options to my shared library with:
g++ -L/path_to_static_boost_libs -shared -o "test.so" ./test.o -lboost_program_options
I can't load library because of undefined reference on abstract_variables_map::operator[]:
0009b9f8 W int const& boost::program_options::variable_value::as<int>() const
U boost::program_options::abstract_variables_map::operator[](std::string const&) const
0009b55e W boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_any_cast> >::clone() const
I tried to build another program (not shared library) with program_options library linked statically and didn't get undefined reference.
Why I get undefined reference when I'm linking shared library?