Mail Archives: djgpp/2003/11/20/10:16:06
Eli Zaretskii wrote:
> keri****@hotmail.com wrote:
> > I am trying to teach myself sprite usage by looking at the example
> > file exsprite.c but I cannot even get the file to compile as it came
> > with Allegro. GPP gives me the following errors:
> >
> > C:\DJGPP\allegro\examples>gpp exsprite.c -o exsprite.exe -lalleg
> > exsprite.c: In function `int main(int, char**)':
> > exsprite.c:100: error: invalid conversion from `void*' to `const RGB*'
>
> Since exsprite.c has a `.c' extension, it's probably a C program, not
> a C++ program. So why did you use gpp to compile it? Please try
> using gcc instead, and see if that helps.
This demonstrates a difference between gxx and gpp that I was not
previously aware of. gxx, like gcc, uses the file's extension to
decide whether to use the C compiler or C++ compiler. In contrast,
gpp apparently ignores the file's extension and compiles it using the
C++ compiler.
Both gxx and gpp automatically link in the C++ standard library, while
gcc does not. And, as I think Eli recently pointed out, gpp interacts
better with Windows XP than gxx does.
Are there other differences in expected behavior between gpp and gxx?
Best regards,
Tom
- Raw text -