CXX tru64
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > CXX tru64




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    CXX tru64  
Doug Ly


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-26-04 07: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







[ Post a follow-up to this message ]



    Re: CXX tru64  
Materialised


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:02 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register