error help

This is a discussion on error help within the Linux Programming forums, part of the Platform Specific Boards category; i keep getting an error here and i cant seem to figure it out... for some reason =/ Code: #include ...

  1. #1
    xlord
    Guest

    error help

    i keep getting an error here and i cant seem to figure it out... for some reason =/

    Code:
    #include <ncurses.h>
    
    
    int main()
    {
    
    int num = 0;
    
     initscr();
     noecho();
     cbreak();
     keypad(stdscr,TRUE);
     
     if(has_color())
     {
       start_color();
    
     init_pair(1,COLOR_WHITE,  COLOR_BLUE);
     init_pair(2,COLOR_BLUE,   COLOR_WHITE);
     init_pair(3,COLOR_RED,    COLOR_WHITE);
     curs_set(0);
     }
    
     for(;;)
     {
        int ch = getch();
        attrset(COLOR_PAIR(num % 8));
        num++;
     }
       finish(0);
    
       refresh();
       endwin();
       return 0;
    }
    here is the error:

    /tmp/cc0TsutE.o: In function `main':
    /tmp/cc0TsutE.o(.text+0x30): undefined reference to `has_color'
    collect2: ld returned 1 exit status


    can anyone tell me what this meanz..?

  2. #2
    xlord
    Guest
    ahh nm i got it =) i was missing the (s)

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21