Boost logo

Boost :

From: Richard Hadsell (hadsell_at_[hidden])
Date: 2003-09-11 07:54:08


Stephen Torri wrote:

>I get the following error when I attempt to compile a program that uses
>lexical_cast:
>
>cxx -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
>-DPACKAGE _STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"rotor\"
>-DVERSION=\"0.1.0\" -I. -I. -g -c Machine.cpp
>cxx: Error:
>/usr/lib/compaq/cxx-6.5.9.31/alpha-linux/include/cxx/sstream, line 58:
> #error directive: "cannot include sstream -- define
> __USE_STD_IOSTREAM to override default - see section 7.1.2 of
>the
> C++ Using Guide"
>#error "cannot include sstream -- define __USE_STD_IOSTREAM to override
>default - see section 7.1.2 of the C++ Using Guide"
>-^
>cxx: Error: /usr/include/boost/lexical_cast.hpp, line 52: namespace
>"std" has
> no member "stringstream"
> detected during instantiation of "Target
> boost::lexical_cast<Target,Source>(Source) [with
> Target=int, Source=std::basic_string<char,
> std::char_traits<char>, std::allocator<char>>]"
> std::stringstream interpreter;
>-------------^
>cxx: Error: /usr/include/boost/lexical_cast.hpp, line 57: namespace
>"std" has
> no member "ws"
> detected during instantiation of "Target
> boost::lexical_cast<Target,Source>(Source) [with
> Target=int, Source=std::basic_string<char,
> std::char_traits<char>, std::allocator<char>>]"
> !(interpreter >> std::ws).eof())
>---------------------------------^
>cxx: Info: 3 errors detected in the compilation of "Machine.cpp".
>make: *** [Machine.o] Error 1
>
>Stephen
>
>
The default mode for cxx is to use the old iostream library. In order
to use iostreams as defined in the Standard C++ Library, you must
compile with option -D__USE_STD_IOSTREAM.

-- 
Dick Hadsell			914-259-6320  Fax: 914-259-6499
Reply-to:			hadsell_at_[hidden]
Blue Sky Studios                http://www.blueskystudios.com
44 South Broadway, White Plains, NY 10601

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk