Description of problem: Failure to compile everytime readline is required. Version-Release number of selected component (if applicable): readline-4.3-5 How reproducible: Completely reproducible in my pretty-much updated system. The RPMs corresponding to most of the files usually required for development (including readline and readline-devel) are installed. Steps to Reproduce: 1. Create a file with the name and content indicated by the next step/item (i.e. 2.) 2. $ cat tst-readline.c #include <stdio.h> #include <readline/readline.h> #include <readline/history.h> int main() { char* prompt="PROMPT>"; char* linealeida; linealeida = readline(prompt); printf("\n%s\n", linealeida); } 3. $ gcc -lreadline tst-readline.c -o tst-readline Actual results: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libreadline.so: undefined reference to `tgetnum' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libreadline.so: undefined reference to `tgoto' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libreadline.so: undefined reference to `tgetflag' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libreadline.so: undefined reference to `BC' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libreadline.so: undefined reference to `tputs' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libreadline.so: undefined reference to `PC' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libreadline.so: undefined reference to `tgetent' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libreadline.so: undefined reference to `UP' /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libreadline.so: undefined reference to `tgetstr' collect2: ld returned 1 exit status Expected results: (a succesfull compilation and the file tst-readline created) Additional info: I'm a readline newbie, and therefore I might be missing something. If so, please say how a simple readline example should be compiled. BTW, I guess the problem might be asociated to readline not being correctly linked againste either curses(terminfo) or termcap. Thanks.
Add "-ltermcap" to gcc's command line.