inconsistency compiling sdl graphics code with gcc and g++
Andrew Haley
aph@redhat.com
Sun Feb 7 03:08:00 GMT 2010
On 06/02/10 16:05, me wrote:
> I've explained my problem at...
> http://www.codeguru.com/forum/showthread.php?t=492258
>
> It's probably something I'm doing wrong but I've always been able to
> compile gcc stuff with g++.
It's this:
typedef void GLvoid;
He's using GLvoid like this:
GLvoid KillFont( GLvoid )
Which is quite unnecessary in C++. Use:
GLvoid KillFont()
People often think that C++ is a strict subset of C, but it isn't really.
In this case, there is no problem making a program that is compatible
with both languages.
Andrew.
More information about the Gcc-help
mailing list