Menu

#9 PAL failure to build with gcc >= 4.4.3(afik)

open
nobody
None
5
2013-01-08
2012-12-10
Anonymous
No

Turns out, newer versions of gcc have strictened up a bit..

In file included from /home/sreich/ore-chasm/pal/pal/palMath.cpp:1:0:
/home/sreich/ore-chasm/pal/pal/palMath.h:65:20: error: 'size_t' has not been declared
/home/sreich/ore-chasm/pal/pal/palMath.h:66:21: error: declaration of 'operator[]' as non-function
/home/sreich/ore-chasm/pal/pal/palMath.h:66:18: error: expected ';' at end of member declaration
/home/sreich/ore-chasm/pal/pal/palMath.h:66:28: error: expected ')' before 'idx'
/home/sreich/ore-chasm/pal/pal/palMath.h:92:20: error: 'size_t' has not been declared
/home/sreich/ore-chasm/pal/pal/palMath.h:93:21: error: declaration of 'operator[]' as non-function
/home/sreich/ore-chasm/pal/pal/palMath.h:93:18: error: expected ';' at end of member declaration
/home/sreich/ore-chasm/pal/pal/palMath.h:93:28: error: expected ')' before 'idx'

use std::size_t instead of C lib size_t. a 'using namespace std;' at the top of this file fixes it(or just specify std::size_t).

Discussion