Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   programming with ncurses (http://www.go4expert.com/forums/programming-with-ncurses-t10505/)

nmh 9May2008 21:10

programming with ncurses
 
I have to write a program with ncurses

Code:

#include <ncurses.h>
int main()
{
        initscr();                /* Start curses mode              */
        printw("Hello World !!!"); /* Print Hello World              */
        refresh();                /* Print it on to the real screen */
        getch();                  /* Wait for user input */
        endwin();                  /* End curses mode                */
        return 0;
}

to learn I use above code. It gives en error message


/tmp/ccJ7KVwh.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

reasons??? can u please help. I thank you in advance.

to compile I use this: - gcc test2.cpp -lncurses

al2k8ht 3Apr2010 19:25

Re: programming with ncurses
 
Whats that ur using is it in console??

try compiling using g++ -oobjectname filename.cpp -lncurses

This is how i used in fedora to compile c++ Ncurses

Cheers!


All times are GMT +5.5. The time now is 12:10.