From: ryot AT bigfoot DOT com (George Ryot) Newsgroups: comp.os.msdos.djgpp Subject: Re: How can I get this program to compile? Message-ID: <381e74e5.4559902@news.clara.net> References: X-Newsreader: Forte Agent 1.5/32.452 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 22 Date: Sat, 30 Oct 1999 23:03:30 GMT NNTP-Posting-Host: 195.8.92.13 X-Complaints-To: abuse AT clara DOT net X-Trace: nnrp3.clara.net 941324610 195.8.92.13 (Sun, 31 Oct 1999 00:03:30 BST) NNTP-Posting-Date: Sun, 31 Oct 1999 00:03:30 BST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Andrew R. Gillett 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