strstrea.h ??

Help
Bill Lear
2005-04-19
2012-09-17
  • Bill Lear
    Bill Lear
    2005-04-19

    I am trying to build PasswordSafe V2.10 using Visual Studio.Net, but the compiler cannot find <strstrea.h>. I've tried renaming to strstream.h, etc, but no success -- can anyone tell me what I'm doing wrong?

     
    • Rony Shapiro
      Rony Shapiro
      2005-04-22

      Odd. strsrea.h is part of the standard C++ library. You might want to search you disk for this file, and add the directory where it's found to your include path.

      Alternately, removing the ".h" might help, that is, #include <strstrea>.

      Cheers,

      Rony

       
      • Bill Lear
        Bill Lear
        2005-04-23

        Has anyone built this with Visual Studio .NET?

        I searched my drive for strstrea*, and found no strstrea.h.

        I did find "strstream" in the "Visual Studio .NET 2003\Vc7\include directory

        I tried changing <strstrea.h> to <strstrea> and to <strstream> to no avail.

        Since I have had other compatibility issues with .NET. I may just revert to VS6.

         
    • Bill Lear
      Bill Lear
      2005-04-23

      OK, I found the problem, but have not fixed it yet.

      I checked the MSDN knowlege base and found the following:

      http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_Differences_in_iostream_implementation.asp

      "The old iostream library was removed beginning in Visual C++ .NET 2003.

      The main difference between the Standard C++ Library and previous run-time libraries is in the iostream library. Details of the iostream implementation have changed, and it may be necessary to rewrite parts of your code that use iostream if you want to link with the Standard C++ Library.

      You will have to remove any old iostream headers (fstream.h, iomanip.h, ios.h, iostream.h, istream.h, ostream.h, streamb.h, and strstrea.h) you have included in your code and add one or more of the new Standard C++ iostream headers (<fstream>, <iomanip>, <ios>, <iosfwd>, <iostream>, <istream>, <ostream>, <sstream>, <streambuf>, and <strstream>, all without the .h extension). "

       
      • Bill Lear
        Bill Lear
        2005-04-23

        Success

        It took three changes to dboxmain.cpp to compile with VS.NET 2003:

        Line 42:
        <#include <strstrea.h>
        >#include <strstream>
        Line 821:
        < ostrstream os;
        > std::ostrstream os;

        Line 828:
        < os << ends;
        > os << std::ends;

        Bill

         
        • Rony Shapiro
          Rony Shapiro
          2005-04-24

          Great! I've incoprprated your changes in the CVS repository, modified so that the file will compile cleanly under both .Net and MSVC 6.

          Thanks,

          Rony