delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/22/22:34:53

From: Damon Hogan <damonh AT pgmincorporated DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: curses.h And my first Post here, Hello everyone..
Date: Wed, 22 Dec 1999 18:00:06 -0700
Organization: XMission http://www.xmission.com/
Lines: 72
Message-ID: <38617416.E24D16A8@pgmincorporated.com>
References: <384CA3B6 DOT 5260A809 AT ccs DOT iitb DOT ernet DOT in> <384DDF91 DOT C39D1317 AT ccs DOT iitb DOT ernet DOT in>
NNTP-Posting-Host: mail.pgmincorporated.com
Mime-Version: 1.0
X-Trace: news.xmission.com 945910818 18403 166.70.119.101 (23 Dec 1999 01:00:18 GMT)
X-Complaints-To: abuse AT xmission DOT com
NNTP-Posting-Date: 23 Dec 1999 01:00:18 GMT
X-Mailer: Mozilla 4.6 [en] (Win98; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

First of all djgpp does not come with curses directly.  You can download the
library pdcurses vers 2.2.

headers

curses.h
panel.h

go into the include dir

libraries

libcurso.a
libpano.a

go into the "LIB" dir.

then link with -lcurso and or -lpano rather than -lcurses or -lpanel since
these library binaries have different names than the standard curses library
file.

Also compiling under CPP is tricky under DJGPP.  A must for using a string
class
and curses together (I recommend this highly).

A simple fix is as follows.
copy curses.h to cppcurs.h
edit cppcurs.h
Add the following lines to the top of cppcurs.h

#define bool unsigned char
#define CPLUSPLUS 1

Then change the line (new line number 428) to look like this.

//typedef unsigned char bool;  /* PDCurses Boolean type        */

(Simply commenting the line out.)

Now just use #include <cppcurs.h> instead of #include <curses.h> for your cpp
programs.  And continue to use #include <curses.h> for your c programs they
are not interchangeable.   Compile both ways with -lcurso.

There you go... 2 Days of work free of charge to you.  Hope someone will
return the
favor.

PS:  I guess you can consider me the current maintainer of PDCURSES however
I do not know how to sign up for the job.. Anyway this will work for ya, trust
me.
Have a good day.

Damon Hogan

Gaurang Kanvinde wrote:

> hi everybody.
>
> please help me with this.
>
> > nowhere in the documentation have i come accross a help section for
> > curses.h
> >
> > i want to know how to compile and link files when using curses.h
> > the good old linux staement       gcc filename.c -lcurses   or     gcc
> > filename.c -lncurses  doesn't work here. i have downloaded the whole pdc
> > distributiion (zip file) from djgpp server.  i didn't find any answer
> > there either. hence this call for help to u.
>
> bye,
> gaurang.

- Raw text -


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