Menu

#1212 v9.20, StreamObjects.cpp fails to compile with g++

closed-fixed
nobody
None
5
2011-03-05
2011-03-05
No

Using 7z920.tar.bz2 as available from 7-zip.org, g++ 4.3.4 fails to compile StreamObjects.cpp. There are two issues, one is that it uses free() and other stdlib.h functions without importing the header (I fixed this by including stdlib.h from Alloc.h and removing the include from Alloc.c) and there appears to be an ambiguous conversion in CDynBufSeqOutStream::CopyToBuffer, _buffer has `operator const unsigned char *()` and `operator unsigned char *()` and g++ does not know which one to use to get a `cost void*` needed by memcpy (I fixed that by invoking the operator explicitly, not sure if that is the best way).

Discussion

  • Igor Pavlov

    Igor Pavlov - 2011-03-05
    • status: open --> closed-fixed
     
  • Igor Pavlov

    Igor Pavlov - 2011-03-05

    Thanks!

     

Log in to post a comment.

MongoDB Logo MongoDB