collect2: ld returned 1 exit status

Discussion in 'The Lounge' started by elid58, Feb 6, 2009.

  1. elid58

    elid58

    Joined:
    Feb 6, 2009
    Messages:
    1
    I get these errors when compiling c_getkey.c in my library.
    1 c_getkey.c:127:24: curses.h: No such file or directory
    2 c_getkey.c: In function `c_getkey':
    3 c_getkey.c:166: `curscr' undeclared (first use in this function)
    4 c_getkey.c:166: (Each undeclared identifier is reported only once
    5 c_getkey.c:166: for each function it appears in.)

    This is on linux version 2.4.21-50. the same code works fine on different linux.
    Any idea how can resolve this. here is portion of the code. Please help
    122 ######################################################################
    123 */
    124 #ifdef is_hpux_11
    125 # include "/usr/old/usr/include/curses.h"
    126 #else
    127 # include "curses.h"
    128 #endif
    129
    130 /*
    131 ######################################################################
    132 function c_getkey()
    133 ######################################################################
    134 */
    135 int c_getkey(int num_args)
    136 {
    137 /* variables */
    138 int code;
    139 char in_chr[2];
    140 int y_old;
    141 int x_old;
    142 int y_get;
    143 int x_get;
    144
    145 /* get arguments */
    146 popint(&x_get);
    147 popint(&y_get);
    148
    149 /* clear the return string */
    150 in_chr[0] = '\0';
    151 in_chr[1] = '\0';
    152
    153 /* position cursor if requested */
    154 if (y_get)
    155 {
    156 /* adjust coordinates to physical screen values */
    157 y_get--;
    158 x_get--;
    159
    160 /* make sure coordinates are in bounds */
    161 if (y_get < 0 || y_get > LI - 1)
    162 y_get = 0;
    163 if (x_get < 0 || x_get > CO - 1)
    164 x_get = 0;
    165
    166 y_old = curscr->_cury;
    167 x_old = curscr->_curx;
    168
    169 /*
    170 * If the cursor position is less than zero or off the screen,
    171 * then set to 0.
    172 */
    173 if (y_old < 0 || y_old > LI - 1)
    174 y_old = 0;
    175 if (x_old < 0 || x_old > CO - 1)
    176 x_old = 0;
    177
    178 /* position the cursor - INFORMIX */
    179 mvcur(y_old, x_old, y_get, x_get);
    180
    181 } /* end if */
    elid58, Feb 6, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wolfgang Kern
    Replies:
    7
    Views:
    1,623
    John Bowling
    Aug 7, 2004
  2. Shelly

    Marking Newsgroup Read on Exit

    Shelly, Sep 22, 2004, in forum: Firefox
    Replies:
    3
    Views:
    474
    =?ISO-8859-1?Q?=22=2Ebr=EFan=2E=22?=
    Sep 23, 2004
  3. Gary Nored

    Subscribed newsgroups disappear on exit

    Gary Nored, Oct 6, 2004, in forum: Firefox
    Replies:
    6
    Views:
    410
    Leonidas Jones
    Oct 7, 2004
  4. Jim Leder

    Marking a News Group as read on exit

    Jim Leder, Jul 28, 2005, in forum: Firefox
    Replies:
    12
    Views:
    763
    Bryan Harrison
    Jul 30, 2005
  5. Jim Chip
    Replies:
    16
    Views:
    19,791
Loading...

Share This Page