boost 1.32.0 program_options does not compile with VC7.1 + stlport 4.6.2

Hi, when I compile program_options using VC7.1 and STLport 4.6.2 I get the following errors: <snip> ...found 672 targets... ...updating 14 targets... vc-C++ bin\boost\libs\program_options\build\libboost_program_options.lib\vc-7_1-stlport\release\threading-multi\utf8_codecvt_facet.obj utf8_codecvt_facet.cpp E:\work\CommonLibs\test\boost_1_32_0\boost_1_32_0\boost\program_options\detail\utf8_codecvt_facet.hpp(70) : error C2039: 'codecvt' : is not a member of 'operator``global namespace''' E:\work\CommonLibs\test\boost_1_32_0\boost_1_32_0\boost\program_options\detail\utf8_codecvt_facet.hpp(70) : error C2873: 'codecvt' : symbol cannot be used in a using-declaration </snip> when STLport is used, BOOST_NO_STDC_NAMESPACE is defined on my machine. and then the following code fails (from program_options\detail\utf8_codecvt_facet.hpp around line 70): #elif defined(BOOST_NO_STDC_NAMESPACE) typedef std::mbstate_t mbstate_t; namespace std{ using ::codecvt; } // namespace std #endif But STLport 4.6.2 puts codecvt correctly under std... Would be great if this can be fixed for STLport users :-) Regards Ralf

I found the same thing, with the same setup. I managed to track it down to a problem in the file "boost_1_32_0/boost/program_options/detail/utf8_codecvt_facet.hpp" The "program_options" library incorrectly checks the "BOOST_NO_STDC_NAMESPACE" macro, when really, it should be checking the "BOOST_NO_STD_LOCALE" macro (since the locale stuff is all that the file is interested in). I made the following one-symbol patch (attached), and the library now seems to compile and work with no problems. -Andrew. -- Andrew D. Fernandes (mailto:andrew@fernandes.org) Telephone +1 919 602 4214, (http://www.fernandes.org/) Ralf Juergensen wrote:
Hi,
when I compile program_options using VC7.1 and STLport 4.6.2 I get the following errors:
<snip> ...found 672 targets... ...updating 14 targets... vc-C++
bin\boost\libs\program_options\build\libboost_program_options.lib\vc-7_1-stlport\release\threading-multi\utf8_codecvt_facet.obj
utf8_codecvt_facet.cpp
E:\work\CommonLibs\test\boost_1_32_0\boost_1_32_0\boost\program_options\detail\utf8_codecvt_facet.hpp(70)
: error C2039: 'codecvt' : is not a member of 'operator``global namespace'''
E:\work\CommonLibs\test\boost_1_32_0\boost_1_32_0\boost\program_options\detail\utf8_codecvt_facet.hpp(70)
: error C2873: 'codecvt' : symbol cannot be used in a using-declaration </snip>
when STLport is used, BOOST_NO_STDC_NAMESPACE is defined on my machine. and then the following code fails (from program_options\detail\utf8_codecvt_facet.hpp around line 70):
#elif defined(BOOST_NO_STDC_NAMESPACE) typedef std::mbstate_t mbstate_t; namespace std{ using ::codecvt; } // namespace std #endif
But STLport 4.6.2 puts codecvt correctly under std...
Would be great if this can be fixed for STLport users :-)
Regards
Ralf
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
--- boost_1_32_0/boost/program_options/detail/utf8_codecvt_facet.hpp.original 2004-11-03 01:13:24.000000000 -0500 +++ boost_1_32_0/boost/program_options/detail/utf8_codecvt_facet.hpp 2004-12-03 12:19:51.864798400 -0500 @@ -64,7 +64,7 @@ #endif #elif defined(__COMO__) || defined(_MSC_VER) && _MSC_VER <= 1300 typedef ::mbstate_t mbstate_t; -#elif defined(BOOST_NO_STDC_NAMESPACE) +#elif defined(BOOST_NO_STD_LOCALE) typedef std::mbstate_t mbstate_t; namespace std{ using ::codecvt;
participants (2)
-
Andrew Fernandes
-
Ralf Juergensen