04-26-04 07:34 PM
Doug Ly wrote:
> Hi
> I try to compile this code on a True64 Compaq using CXX compiler and get
> this
>
> #include <stdlib.h>
> #include <curses.h>
>
> main()
> {
> initscr();
> WINDOW *w1 = newwin(7,15,2,3);
> box (w1, '|', '*');
>
> mvwaddstr(w1, 1,1,"Blah Blah");
> wrefresh(w1);
>
> endwin();
> }
>
> cxx -o test test.cpp -lcurses
> cxx: Error: test.cpp, line 10: identifier "mvwaddstr" is undefined
> mvwaddstr(w1, 1,1,"Blah Blah");
> --------^
> cxx: Info: 1 error detected in the compilation of "test.cpp".
>
> I've tried waddstr, addstr but it gave me the same error.
> Can anybody help me with this please.
> Thanks
>
>
Works fine with gcc:
mick $ gcc test.c -o test -lncurses
mick $ ./test
?*************?
|Blah Blah |
| |
| |
| |
| |
?*************?
mick $
And also with g++
mick $ g++ test.cpp -o test -lncurses
mick $ ./test
?*************?
|Blah Blah |
| |
| |
| |
| |
?*************?
--
------
Materialised
perl -e 'printf "%silto%c%sck%ccodegurus%corg%c", "ma", 58, "mi", 64,
46, 10;'
[ Post a follow-up to this message ]
|