From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,d4653607cd2a7a86,start X-Google-Attributes: gidf678f,public X-Google-Thread: 111308,d4653607cd2a7a86,start X-Google-Attributes: gid111308,public X-Google-ArrivalTime: 1994-03-16 10:08:25 PST Xref: gmd.de comp.unix.osf.misc:1084 comp.client-server:2893 Path: gmd.de!xlink.net!news.dfn.de!news.dfn.de!zam103!ikpgem02!zolnie From: zolnie@ikpgem02.ikp (Piotr A.Zolnierczuk) Newsgroups: comp.unix.osf.misc,comp.client-server Subject: DEC OSF/1 curses problem Keywords: curses, DEC OSF/1 Message-ID: <978@zam103.zam.kfa-juelich.de> Date: 16 Mar 94 18:08:25 GMT Sender: news@zam103.zam.kfa-juelich.de Followup-To: comp.unix.osf.misc Organization: Forschungszentrum Juelich (KFA), Germany Nntp-Posting-Host: ikpgem02 Hi, I have tried to compile a sample program from curses_intro(3) man page from DEC. I added only one line into main routine, namely ch = getch() and some #ifdef for DEC C++ (1.3) in the beginning What I observed that it compiles without troubles with cc and cxx (when having extension .c, C mode ) but fails to compile when having extension .cc or .cxx ( C++ mode). There is a bug in curses.h file, getch() is wrongly delclared (as for C++). On the other hand, when removing #ifdef __cplusplus surrounding #include , getch() is OK, but now initscr has a bad linkage type. Any comments, hints how to solve it (especially from DEC)? Piotr A.Zolnierczuk --------------------- THAT STRANGE FILE curs.c or curs.cc or curs.cxx ------------ #ifdef __cplusplus extern "C" { #endif #include #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" int wmove (WINDOW *win, int y, int x) ; extern "C" int waddstr (WINDOW *win,char *str); extern "C" int wrefresh (WINDOW *win); extern "C" int endwin(); #endif int main() { int ch; initscr(); move(LINES/2-1,COLS/2-4); addstr("MID"); refresh(); addstr("SCREEN"); refresh(); ch = getch(); endwin(); return(ch); }