delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/29/06:09:14

Date: Sun, 29 Jul 2001 13:09:03 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Gwen <mb11363 AT chello DOT be>
cc: djgpp AT delorie DOT com
Subject: Re: How to use Pdcurses 2.04 with GPP ?
In-Reply-To: <01c11811$63766a20$108784d5@feta>
Message-ID: <Pine.SUN.3.91.1010729130710.2410B-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 29 Jul 2001, Gwen wrote:

> int main(void){
>   initscr();
>   start_color();
>   return 0;
> }
> 
> with gcc : gcc -o test1.exe test1.c ..\bin\libpdcurses.a  
> it works
> 
> with gpp (I rename test1.c to test1.cpp) : gpp -o test1.exe test1.cpp
> .\bin\libpdcurses.a
> it says me : "implicit declaration of function 'initscr(...)'' "  ( and
> idem for start_color() )
> 
> so what's wrong ?

You didn't include the curses.h header, so the compiler doesn't see the 
prototypes of PDCurses functions.  The C++ language disallows this 
(unlike C, where it is not an error), so the compiler complains.  If you 
add a -Wall switch, the C compiler will print a warning.

- Raw text -


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