www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/30/19:33:41

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: <MPG DOT 12855b6a23f7ff9a98b4db AT news DOT freeserve DOT net>
X-Newsreader: Forte Agent 1.5/32.452
MIME-Version: 1.0
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 <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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019