Boost logo

Boost Users :

Subject: [Boost-users] [Program Options] Difficulty compiling for static runtime library
From: Lindley M French (lfrench1_at_[hidden])
Date: 2009-07-10 17:10:24


I have a large project that I'd like to use Boost.Program Options with. Most of the other Visual Studio 2005 projects are set to link against "Multithreaded" or "Multithreaded Debug" rather than the DLL variants of same; so of course, I need to build Program Options accordingly.

I tried this:
bjam.exe" release --runtime-link=static program_options

But that did not produce the library that VS wants, which is:

libboost_program_options-vc80-mt-s-1_39.lib

Actually, that build setting caused program_options to throw a massive number of warnings, mostly stuff like:
.\boost/program_options/detail/cmdline.hpp(128) : warning C4251: 'boost::program_options::detail::cmdline::m_style_parser' : class 'boost::function1
,T0>' needs to have dll-interface to be used by clients of class 'boost::program_options::detail::cmdline'
        with
        [
            R=std::vector<boost::program_options::option>,
            T0=std::vector<std::string> &
        ]

and also

.\boost/program_options/errors.hpp(21) : warning C4275: non dll-interface class 'std::logic_error' used as base for dll-interface class 'boost::prog
m_options::error'
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\INCLUDE\stdexcept(22) : see declaration of 'std::logic_error'
        .\boost/program_options/errors.hpp(21) : see declaration of 'boost::program_options::error'

Any ideas?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net