I found that if I replaced every instance of strstream with
stringstream everything was okay (after #including iostream).

I'm not quite sure how to fix this in general, as it seems that the
IFDEF SSTREAM fails to do its job. Can anyone comment on what this
IFDEF is supposed to be doing?

I note that the same problem occurs with smilesformat.cpp and presumably
any format where strstream/stringstream is used.

- Noel

On 7 February 2010 12:59, Noel O'Boyle <[email protected]> wrote:
> Hello all,
>
> I've just updated to Ubuntu 9.10. Here's the error message I get when
> compiling cmlformat.cpp on trunk using cmake:
>
> Scanning dependencies of target cmlformat
> [ 64%] Building CXX object 
> src/formats/CMakeFiles/cmlformat.dir/xml/cmlformat.o
> In file included from /usr/include/c++/4.4/backward/strstream:46,
>                 from
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:35:
> /usr/include/c++/4.4/backward/backward_warning.h:28:2: warning:
> #warning This file includes at least one deprecated or antiquated
> header which may be removed without further notice at a future date.
> Please use a non-deprecated interface with equivalent functionality
> instead. For a listing of replacement headers and interfaces, consult
> the file backward_warning.h. To disable this warning use
> -Wno-deprecated.
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp: In
> member function ‘virtual bool
> OpenBabel::CMLFormat::WriteMolecule(OpenBabel::OBBase*,
> OpenBabel::OBConversion*)’:
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1482:
> error: request for member ‘c_str’ in ‘id.std::strstream::str()’, which
> is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1483:
> error: request for member ‘c_str’ in ‘eltyp.std::strstream::str()’,
> which is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1486:
> error: request for member ‘c_str’ in ‘iso.std::strstream::str()’,
> which is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1489:
> error: request for member ‘c_str’ in ‘chg.std::strstream::str()’,
> which is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1492:
> error: request for member ‘c_str’ in ‘spn.std::strstream::str()’,
> which is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1495:
> error: request for member ‘c_str’ in ‘hct.std::strstream::str()’,
> which is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1499:
> error: request for member ‘c_str’ in ‘x.std::strstream::str()’, which
> is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1500:
> error: request for member ‘c_str’ in ‘y.std::strstream::str()’, which
> is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1504:
> error: request for member ‘c_str’ in ‘x.std::strstream::str()’, which
> is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1505:
> error: request for member ‘c_str’ in ‘y.std::strstream::str()’, which
> is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1506:
> error: request for member ‘c_str’ in ‘z.std::strstream::str()’, which
> is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1514:
> error: request for member ‘c_str’ in ‘id.std::strstream::str()’, which
> is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1519:
> error: request for member ‘c_str’ in ‘eltyp.std::strstream::str()’,
> which is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1526:
> error: request for member ‘c_str’ in ‘chg.std::strstream::str()’,
> which is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1534:
> error: request for member ‘c_str’ in ‘hct.std::strstream::str()’,
> which is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1542:
> error: request for member ‘c_str’ in ‘x.std::strstream::str()’, which
> is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1547:
> error: request for member ‘c_str’ in ‘y.std::strstream::str()’, which
> is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1554:
> error: request for member ‘c_str’ in ‘z.std::strstream::str()’, which
> is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1595:
> error: request for member ‘c_str’ in ‘ord.std::strstream::str()’,
> which is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1619:
> error: no matching function for call to ‘std::strstream::str(const
> char [1])’
> /usr/include/c++/4.4/backward/strstream:168: note: candidates are:
> char* std::strstream::str()
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1638:
> error: request for member ‘c_str’ in ‘ord.std::strstream::str()’,
> which is of non-class type ‘char*’
> /home/user/tools/openbabel/trunk/src/formats/xml/cmlformat.cpp:1655:
> error: request for member ‘c_str’ in ‘ord.std::strstream::str()’,
> which is of non-class type ‘char*’
> make[2]: *** [src/formats/CMakeFiles/cmlformat.dir/xml/cmlformat.o] Error 1
> make[1]: *** [src/formats/CMakeFiles/cmlformat.dir/all] Error 2
>
> The file backward_warning.h has (among others):
>  A list of valid replacements is as follows:
>
>  Use:                                  Instead of:
>  <sstream>, basic_stringbuf            <strstream>, strstreambuf
>  <sstream>, basic_istringstream        <strstream>, istrstream
>  <sstream>, basic_ostringstream        <strstream>, ostrstream
>  <sstream>, basic_stringstream         <strstream>, strstream
>
> Regards,
>   Noel
>

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
OpenBabel-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to