It would seem that Windows GCC (even though the latest 4.2.0) will not compile it like it does on my linux system. A normal compile results with:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/SDL -Dmain=SDL_main -I./../libgag/include -I/usr/include/SDL -Dmain=SDL_main -I/usr/include/freetype2 -Wall -I/usr/include/SDL -Dmain=SDL_main -MT
Utilities.o -MD -MP -MF ".deps/Utilities.Tpo" \\ -c -o Utilities.o `test -f 'Utilities.cpp' || echo './'`Utilities.cpp; \\ then mv ".deps/Utilities.Tpo" ".deps/Utilities.Po"; \\
else rm -f ".deps/Utilities.Tpo"; exit 1; \\ fi Utilities.cpp: In function 'void Utilities::read(int, void*, size_t)': Utilities.cpp:499: error: '::read' has not been declared Utilities.cpp
: In function 'void Utilities::write(int, const void*, size_t)': Utilities.cpp:521: error: '::write' has not been declared make[2]: *** [Utilities.o] Error 1 make[2]: Leaving directory `/home/glob2/glob2-master/src'
make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/glob2/glob2-master' make: *** [all] Error 2
And removing the two :: in front of read and write function calls results in:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/SDL -Dmain=SDL_main -I./../libgag/include -I/usr/include/SDL -Dmain=SDL_main -I/usr/include/freetype2 -Wall -I/usr/include/SDL -Dmain=SDL_main -MT Utilities.o -MD -MP -MF ".deps/Utilities.Tpo" \\
-c -o Utilities.o `test -f 'Utilities.cpp' || echo './'`Utilities.cpp; \\ then mv ".deps/Utilities.Tpo" ".deps/Utilities.Po"; \\ else rm -f ".deps/Utilities.Tpo"; exit 1; \\
fi Utilities.cpp: In function 'void Utilities::read(int, void*, size_t)': Utilities.cpp:499: error: void value not ignored as it ought to be Utilities.cpp: In function 'void Utilities::write(int, const void*, size_t)':
Utilities.cpp:521: error: void value not ignored as it ought to be make[2]: *** [Utilities.o] Error 1 make[2]: Leaving directory `/home/glob2/glob2-master/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/glob2/glob2-master'
make: *** [all] Error 2
Brad suggested I add #include <stdio.h> to the top of the file, which didn't result in anything different (I also tried stdlib and errno, neither worked).
I would appreciate any help fixing this so I can continue compiling windows and test Lan games (I have two comps, one linux and one windows, so they are perfect for testing compatibility).