I was surprised at how easily Horde3D compiles on
64-
bit Linux considering how much effort it was with older versions. There is however one issue which is pretty easy to fix and I didn't see it mentioned on this forum.
In the file egShader.cpp at around line 266 in the class Tokenizer:
Code:
static const int tokenSize = 128;
should be
Code:
static const long tokenSize = 128;
otherwise you will probably get errors around line 339 and 340 from this
bit of code:
Code:
std::min( _p - p0, tokenSize-1 )
because _p - p0 becomes a long int, while tokenSize-1 is an int and apparently GCC
64-
bit doesn't like that.
To maintain
64-
bit compliance without breaking 32-
bit support it's pretty easy to just replace int with long when not dealing with pointers since on 32-
bit they are identical width datatypes on most architectures and on
64-
bit a long is usually what the programmer is really wanting when they type "int". It does get a
bit messy though as on Windows "int" and "long" are identical even on
64-
bit so they are both 32-
bit datatypes but on
Linux int is 32-
bit and long is
64-
bit, but since most of the stl code like std::min use long in place of int, long is the safer bet and just means more accuracy on
64-
bit linux.