Menu

using std::iostream in socket.h

Help
2001-12-17
2001-12-17
  • Anders Backman

    Anders Backman - 2001-12-17

    Hi there.

    Im experiencing problems when using CommonC++ v1.9.1 under windows using VC++6.0.

    The problems seems to arise from the fact that the using namespace std::iostream is set in socket.h

    This leads to conflicts with other libraries,

    Im using STLPort4.5
    and OpenScenegraph, so it leads to real severere conflicts such as:

    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1409) : error C2008: ':' : unexpected in macro definition
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1409) : warning C4005: 'std' : macro redefinition
            C:\TOOLS\STLPORT-4.5\STLPORT\stl/_epilog.h(20) : see previous definition of 'std'
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1414) : error C2059: syntax error : ':'
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1414) : error C2039: 'iostream_withassign' : is not a member of 'std'
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1414) : error C2039: 'iostream_withassign' : is not a member of 'std'
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1497) : error C2065: 'iostream' : undeclared identifier
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1497) : error C2039: 'iostream_withassign' : is not a member of 'std'
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1497) : error C2057: expected constant expression
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1497) : error C2501: '.alignment member.' : missing storage-class or type specifiers
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1497) : error C2146: syntax error : missing ';' before identifier 'iostream'
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1497) : error C2143: syntax error : missing ';' before '*'
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1497) : error C2501: 'iostream' : missing storage-class or type specifiers
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1498) : error C2501: 'tcp' : missing storage-class or type specifiers
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1498) : warning C4183: 'tcp': member function definition looks like a ctor, but name does not match enclosing class
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1705) : warning C4091: 'extern __declspec(dllimport ) ' : ignored on left of 'int' when no variable is declared
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1705) : error C2143: syntax error : missing ';' before ':'
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1705) : error C2059: syntax error : ':'
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1705) : error C2039: 'iostream_withassign' : is not a member of 'std'
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1705) : error C2146: syntax error : missing ';' before identifier 'ostream'
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1705) : error C2501: 'iostream' : missing storage-class or type specifiers
    c:\projects\commonc++_v2\win32\include\cc++/socket.h(1705) : fatal error C1004: unexpected end of file found

    Any input on this?

     
    • Anders Backman

      Anders Backman - 2001-12-17

      It is stlport and commonc++ that is conflicting.

      Just adding the stlport include directory to the include path will make the apesock demo fail to compile.

      This is rather serious as STLPort is a great way of avoiding crashes in the Windows platform.

      The Microsoft STL library is really a mess.

      So could anyone look into this?

       

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.