Hi guys,
I wrote a code something like this


Qt Code:
  1. Code:
  2. #include <stdio.h>
  3. #include <readline/readline.h>
  4. #include <readline/history.h>
  5.  
  6. int main()
  7. {
  8. char* p = readline("Enter a password:");
  9. printf("You entered:%s", p);
  10. return 0;
  11. }
To copy to clipboard, switch view to plain text mode 
I save the file as-->
pass.c
I compile it as-->
cc pass.c -l readline

I get so many errors as shown

Qt Code:
  1. Code:
  2. g++ -o testncursors main.o -L/usr/lib/qt-3.3/lib -L/usr/X11R6/lib
  3. /usr/lib/libreadline.a -lqt-mt -lXext -lX11 -lm
  4. /usr/lib/libreadline.a(display.o)(.text+0x1d7): In function `cr':
  5. : undefined reference to `tputs'
  6. /usr/lib/libreadline.a(display.o)(.text+0x243): In function `_rl_move_vert':
  7. : undefined reference to `tputs'
  8. /usr/lib/libreadline.a(display.o)(.text+0x290): In function `_rl_move_vert':
  9. : undefined reference to `tputs'
  10. /usr/lib/libreadline.a(display.o)(.text+0x30a): In function
  11. `_rl_clear_to_eol':
  12. : undefined reference to `tputs'
  13. /usr/lib/libreadline.a(display.o)(.text+0x6e0): In function
  14. `_rl_clear_screen':
  15. : undefined reference to `tputs'
  16. /usr/lib/libreadline.a(display.o)(.text+0xbc9): more undefined
  17. references to `tputs' follow
  18. /usr/lib/libreadline.a(display.o)(.text+0x1a2d): In function `update_line':
  19. : undefined reference to `tgoto'
  20. /usr/lib/libreadline.a(display.o)(.text+0x1a45): In function `update_line':
  21. : undefined reference to `tputs'
  22. /usr/lib/libreadline.a(display.o)(.text+0x1c03): In function `update_line':
  23. : undefined reference to `tputs'
  24. /usr/lib/libreadline.a(display.o)(.text+0x1dbd): In function `update_line':
  25. : undefined reference to `tputs'
  26. /usr/lib/libreadline.a(display.o)(.text+0x1e04): In function `update_line':
  27. : undefined reference to `tputs'
  28. /usr/lib/libreadline.a(display.o)(.text+0x1e75): In function `update_line':
  29. : undefined reference to `tputs'
  30. /usr/lib/libreadline.a(display.o)(.text+0x1ef3): In function `update_line':
  31. : undefined reference to `tgoto'
  32. /usr/lib/libreadline.a(display.o)(.text+0x1f0a): In function `update_line':
  33. : undefined reference to `tputs'
  34. /usr/lib/libreadline.a(display.o)(.text+0x33d7): In function `rl_redisplay':
  35. : undefined reference to `tputs'
  36. /usr/lib/libreadline.a(terminal.o)(.text+0x1f6): In function
  37. `_rl_backspace':
  38. : undefined reference to `tputs'
  39. /usr/lib/libreadline.a(terminal.o)(.text+0x2b9): In function `rl_ding':
To copy to clipboard, switch view to plain text mode 
These errors are just a part. There are still many

The library is linked but I dont know what is the problem???? Please help... I'm eagerly waiting for a reply.