Program options auto-link bug

The program options library currently doesn't select the dll-import library when auto-linking to the dll build of the library - it always tries to link to the static lib. The following patch fixes the issue: $ cvs diff -u boost/program_options/config.hpp johnmaddock@cvs.sourceforge.net's password: Index: boost/program_options/config.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/program_options/config.hpp,v retrieving revision 1.2 diff -u -r1.2 config.hpp --- boost/program_options/config.hpp 13 Jul 2004 15:12:24 -0000 1.2 +++ boost/program_options/config.hpp 6 Nov 2004 12:37:09 -0000 @@ -20,6 +20,10 @@ // Set the name of our library, this will get undef'ed by auto_link.hpp // once it's done with it: #define BOOST_LIB_NAME boost_program_options +// tell the auto-link code to select a dll when required: +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_PROGRAM_OPTIONS_DYN_LINK) +# define BOOST_DYN_LINK +#endif // And include the header that does the work: #include <boost/config/auto_link.hpp> OK to commit? John.

John Maddock wrote:
The program options library currently doesn't select the dll-import library when auto-linking to the dll build of the library - it always tries to link to the static lib. The following patch fixes the issue:
$ cvs diff -u boost/program_options/config.hpp johnmaddock@cvs.sourceforge.net's password: Index: boost/program_options/config.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/program_options/config.hpp,v retrieving revision 1.2 diff -u -r1.2 config.hpp --- boost/program_options/config.hpp 13 Jul 2004 15:12:24 -0000 1.2 +++ boost/program_options/config.hpp 6 Nov 2004 12:37:09 -0000 @@ -20,6 +20,10 @@ // Set the name of our library, this will get undef'ed by auto_link.hpp // once it's done with it: #define BOOST_LIB_NAME boost_program_options +// tell the auto-link code to select a dll when required: +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_PROGRAM_OPTIONS_DYN_LINK) +# define BOOST_DYN_LINK +#endif
// And include the header that does the work: #include <boost/config/auto_link.hpp>
OK to commit?
Sure! Thanks for taking care of this. - Volodya

Did you commit it also to 1_32? Seems that's the reason for the new Intel 8.1 failures!
I've looked into this: there appears to be a new bug in Intel 8.1.20 which is causing the dll not to build (an unresolved external to std::codecvt<wchar_t, char, int>::id, which does not occur when building with Intel 8.1.19). I've submitted a bug report to Intel, but for now you may want to mark this up as an expected failure. John.
participants (3)
-
John Maddock
-
Stefan Slapeta
-
Vladimir Prus