List:MySQL++« Previous MessageNext Message »
From:Jonathan Wakely Date:February 11 2011 6:38pm
Subject:Re: Fix for GCC 4.6
View as plain text  
On 11 February 2011 18:30, Remi Collet wrote:
>
> Hi,
>
> During fedora 15 mass rebuild, mysql++ fails to build because of some
> changes in new GCC 4.6.
>
> In file included from ./lib/sql_buffer.h:31:0,
>                 from
> ./lib/sql_buffer.cpp:26:
> ./lib/refcounted.h:258:2: error: 'size_t' does not name a type
>
>
> From GCC documentation:
>
>        STL headers not including <cstddef> any longer
>
> 2 solutions :
>        - include <cstddef>
>        - use std::size_t

std::size_t is defined by <cstddef>, so the correct fix if you want to
use size_t is to explicitly include either <stddef.h> (for ::size_t)
or <cstddef> (for std::size_t)

Otherwise some other change to the Standard Library could cause the
same problem again.  If you use a type, include the header that
declares it.
Thread
Fix for GCC 4.6Remi Collet11 Feb
  • Re: Fix for GCC 4.6Jonathan Wakely11 Feb
    • Re: Fix for GCC 4.6Jonathan Wakely11 Feb
    • Re: Fix for GCC 4.6Tomalak Geret'kal12 Feb
      • Re: Fix for GCC 4.6Jonathan Wakely12 Feb
        • Re: Fix for GCC 4.6Tomalak Geret'kal12 Feb
          • Re: Fix for GCC 4.6Mickael Wolff14 Feb
            • Re: Fix for GCC 4.6Tomalak Geret'kal14 Feb
    • Re: Fix for GCC 4.6Warren Young19 Feb