|
Home > Archive > Unix Programming > April 2004 > CXX tru64
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Doug Ly 2004-04-26, 2:34 pm |
| 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
| |
| Materialised 2004-04-26, 2: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;'
|
|
|
|
|