Menu ▾ ▴

#1 Fails to compile in GCC

open
nobody
None
5
2011-11-30
2011-11-30
No

I tried to compile protodata under Linux with GCC 4.4.5. I got these errors:

$ g++ pd.cpp -o pd
pd.cpp:57: error: expected identifier before numeric constant
pd.cpp:57: error: expected ‘}’ before numeric constant
pd.cpp:57: error: expected unqualified-id before numeric constant
pd.cpp:63: error: invalid conversion from ‘int’ to ‘<unnamed>::Endianness’
pd.cpp:71: error: expected declaration before ‘}’ token

When I commented out all the includes, they were replaced by the errors you would expect from removing all includes. Apparently, the names BIG_ENDIAN and LITTLE_ENDIAN were defined by something included by all the files. I renamed them to Big_Endian and Little_Endian respectively, and the problems went away.

P.S.: I'm theOcelot on your Gamedev.net thread, in case you were wondering why I'm here...

Discussion


Log in to post a comment.