Re: [Boost-users] dynamic link error: boost::program_options::arg not found

Hello Sebastian and thank you for the follow up, I must precise that I have 2 builds of my projects: one linking to the multi threaded static runtime (/MT) and one linking to the multithreaded dynamic runtine (/MD). I defined BOOST_ALL_NO_LIB=1 to disable autolinking, and i am linking manually to libboost_filesystem-vc90-mt-s-1_36.lib libboost_program_options-vc90-mt-s-1_36.lib and libboost_system-vc90-mt-s-1_36.lib for the /MT variant, and to boost_filesystem-vc90-mt-1_36.lib, boost_program_options-vc90-mt-1_36.lib and boost_system-vc90-mt-1_36.lib for the /MD variant. For _both_ variants, I get stuck with following unresolved externals: __declspec(dllimport) public: void __thiscall boost::program_options::detail::cmdline::set_additional_parser(...) __declspec(dllimport) class boost::system::error_category const & __cdecl boost::system::get_generic_category(void) __declspec(dllimport) class boost::system::error_code boost::filesystem::detail::throws What is more suprising, is that for the dynamic version, the set_additional_parser export _does_ appear when I dumpbin /exports ./boost_program_options-vc90-mt-1_36.lib | grep set_additional_parser but the two other symbols do not appear in boost_system-vc90-mt-s-1_36.lib. Any idea what I am getting wrong ? Beginning to feel lost. Cheers, Florent ------------------------------ Message: 2 Date: Thu, 18 Sep 2008 08:15:01 -0400 From: "Sebastian Hauer" <sebastian.hauer@gmail.com> Subject: Re: [Boost-users] dynamic link error: boost::program_options::arg not found (Sebastian Hauer) To: boost-users@lists.boost.org Message-ID: <fb92d9f00809180515uc34f18bk38d0c09545c5d426@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Hello Florent, To check if a symbol is exported correctly I simply use dumpbin which is a command line tool that comes with msvc. E.g.: dumpbin /exports ..\boost_1_36_0\lib.x86-nt-msvc8\boost_program_options-vc80-mt-gd-1_36.lib | grep program_options::arg The "non dll-interface" warnings are OK, but am I missing something or are you not linking against boost_program_options-*.lib ? I have to say that I currently don't use auto linking maybe you should try adding all libraries manually and turn off the auto linking feature by defining: BOOST_ALL_NO_LIB=1. Regards, Sebastian

Hello Florent, On Fri, Sep 19, 2008 at 3:46 AM, Vial, Florent <fvial@arri.de> wrote:
for the /MT variant, and to boost_filesystem-vc90-mt-1_36.lib, boost_program_options-vc90-mt-1_36.lib and boost_system-vc90-mt-1_36.lib for the /MD variant.
This looks correct and I honestly can't see why you would still have unresolved symbols while linking unless perhaps are you doing a debug mode build? In which case you should use the boost_*-vc90-mt-gd-1_36.lib import libraries. Regards, Sebastian
participants (2)
-
Sebastian Hauer
-
Vial, Florent