www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/08/02/11:21:58

From: Prashant Ramachandra <rprash AT wilco-int DOT com>
To: "'Eli Zaretskii'" <eliz AT is DOT elta DOT co DOT il>
Cc: "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com>
Message-ID: <5BF60CD649EDD411A04600B0D049F53AFFA97C@hydmail02.hyd.wilco-int.com>
Subject: RE: Curses in DJGPP
Date: Thu, 2 Aug 2001 13:22:21 +0530
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Reply-To: djgpp AT delorie DOT com

Hi Eli,

Thanks for the suggestion. But it looks like it doesn't solve the problem
completely.

> Did you mean PDcurses?

Yes.

> C++ has its own data type names `bool'.  I guess this line in
> curses.h 
> should be under "#ifndef __cplusplus" or something.

I did that and the program compiled fine. But there are still some strange
problems. If I try compiling the same program with <vector> included, I get
errors like this.

#include <curses.h>
#include <vector>

int main ()
{
  return 0;
}

D:\PRJ>gpp -c test.cc
In file included from d:/djgpp/lang/cxx/iostream.h:31,
                 from d:/djgpp/lang/cxx/stlalgobase.h:53,
                 from d:/djgpp/lang/cxx/vector:30,
                 from test.cc:2:
d:/djgpp/lang/cxx/streambuf.h:210: arguments given to macro `clear'
In file included from d:/djgpp/lang/cxx/stlalgobase.h:53,
                 from d:/djgpp/lang/cxx/vector:30,
                 from test.cc:2:
d:/djgpp/lang/cxx/iostream.h:187: arguments given to macro `clear'
d:/djgpp/lang/cxx/iostream.h:190: arguments given to macro `clear'
In file included from d:/djgpp/lang/cxx/vector:34,
                 from test.cc:2:
d:/djgpp/lang/cxx/stl_vector.h:392: arguments given to macro `erase'
d:/djgpp/lang/cxx/stl_vector.h:399: arguments given to macro `erase'
d:/djgpp/lang/cxx/stl_vector.h:408: arguments given to macro `erase'
d:/djgpp/lang/cxx/stl_vector.h:413: arguments given to macro `erase'
d:/djgpp/lang/cxx/stl_vector.h:540: arguments given to macro `erase'
d:/djgpp/lang/cxx/stl_vector.h:552: arguments given to macro `erase'
In file included from d:/djgpp/lang/cxx/vector:35,
                 from test.cc:2:
d:/djgpp/lang/cxx/stl_bvector.h:613: arguments given to macro `erase'
d:/djgpp/lang/cxx/stl_bvector.h:641: arguments given to macro `erase'
d:/djgpp/lang/cxx/stl_bvector.h:652: arguments given to macro `erase'
d:/djgpp/lang/cxx/stl_bvector.h:783: arguments given to macro `erase'
d:/djgpp/lang/cxx/stl_bvector.h:789: arguments given to macro `erase'
d:/djgpp/lang/cxx/stl_bvector.h:795: arguments given to macro `erase'
d:/djgpp/lang/cxx/stl_bvector.h:799: arguments given to macro `erase'


I think I figured out the problem....

curses.h defines a macro by name clear. There is a method called clear in
class ios in strambuf so there's a conflict.

I could put #include <vector> before include curses and that works fine. But
it doesn't sound like a good thing to do. What if I wanted to use the
clear() method of ios? I'll probably compare the curses.h in GNU/Linux and
the one in PDCurses. Lets see...

I guess I'll look into this and see if I can find a solution. In the
meantime if someone has some kind of fix for this, I'd appreciate if you
could send it.

Thanks,
Prashant


This message is confidential and may also be legally privileged.  If you are not the intended recipient, please notify us immediately.  You should not copy it or use it for any purpose, not disclose its contents to any other person.  The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of Wilco International

- Raw text -


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