Menu

Compilation problem with MSVC 6.0

Help
Anonymous
2001-01-10
2001-02-14
  • Anonymous

    Anonymous - 2001-01-10

    I am having trouble porting my project to win32.  We rely heavily on the STL classes such as map, string, algorithm, set and vector.  The MSVC docs say that old header files (e.g. iostream.h) cannot be used with the new STL headers (no .h e.g. iostream).  When I try to build the project I get compilation errors because CommonC++ uses iostream.h.
    Has anyone else run into this?  What's the solution?

    I've also tried using cygwin but I've run into a pthreads problem there.  Apparently pthread_cond_t isn't implemented in the pthreads library that comes with cygwin.  CommonC++ needs it.

    Help!

    Thanks,
    Derek Crovo

     
    • David Sugar

      David Sugar - 2001-02-05

      This is being worked on...

       
      • Ross Smith II

        Ross Smith II - 2001-02-08
         
        • Kevin Walsh

          Kevin Walsh - 2001-02-14

          I don't think the patch posted addresses the problem mr. subsonic asked about.  I have not applied this patch, but looking at it raw, it appears to fix a few minor details, such as the missing ssize_t, and the bizzare header <strstrea.h> on win32.

          The problem is deeper.  CommonC++ uses the v2 libraries.  That is, the *old* iostream library.  The new v3 libraries (default with current gcc as of, I think, 2.95.2 and default on msvc 6.0 and, maybe, earlier) are not supported by CommonC++.  Some of the things that you have to change on windows to update to v3:

          - most headers of the form <xxxx.h> need to be changed to <xxxx>.  As subsonic says, if you include <iostream.h> you get the *old* iostream library,  which is incompatible with <iostream> the *new* v3 library.

          - update bits and pieces of the source, especially constructors, to fit with the new API's, which are significantly different.

          - fix the buffering class in TCPStream (which appears buggy anyway)

          - make the whole thing namespace aware (msvc puts all the v3 library in namespace std)

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.