1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

programming with ncurses

Discussion in 'C' started by nmh, May 9, 2008.

  1. nmh

    nmh New Member

    Joined:
    Sep 18, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    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
     
    Last edited by a moderator: May 10, 2008
  2. al2k8ht

    al2k8ht New Member

    Joined:
    Apr 3, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    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!
     

Share This Page