Mail Archives: djgpp/1999/10/30/19:33:41
Andrew R. Gillett <arg AT whangomatic DOT freeserve DOT co DOT uk> wrote:
> This is related to the thing I posted a few days ago, where one of my
> programs refused to compile. At the time I noted that the only thing that
> had changed was that I had split the program into two source files. In
> fact, there was one more significant change - I was using gcc/gpp 2.9.5
> instead of 2.8.1. I am pretty sure the test program below would work on
> 2.8.1, but on 2.9.5 it doesn't compile:
There isn't really enough information here to figure out your problem.
What command line are you using to compile and what error is issued?
Possibly the improved error checking of gcc 2.95 is causing the
problem. I don't use Allegro so at a *complete* guess, I'd say that
textout() is wanting char* as the third argument whereas
my_string.c_str() is const char*.
You could solve the problem by either fixing the error(s), or calling
gcc with -fpermisive or -pedantic, or (assuming my guess is near the
mark) casting away the constness of the string before you pass it.
--
george
- Raw text -