Thread: error help

  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