Hi,
I cannot link readline and I cannot find the reason for this failure.
Any help, please!!??
This is the source code I am trying to use:
/********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <readline/readline.h>
#include <readline/history.h>
/********************************************************************/
int main()
{
char * tralala;
/**/
tralala = (char*) readline ("please >");
/**/
}; /* main() */
/********************************************************************/
/********************************************************************/
/********************************************************************/
This is what "gcc try.c" returns:
/tmp/ccw45mkp.o: In function `main':
try.c:(.text+0x19): undefined reference to `readline'
collect2: ld returned 1 exit status
PLEASE NOTE: "/etc/ld.so.conf" contains "/usr/lib" and "/sbin/ldconfig" has been run several times.
I also downloaded the most recent readline version I could find, 6.2, installed it in
my home dir and tried to link to it. Same failure.
Never had a similar error before with any system or Unix flavor I have used. And this
is my 12th year with Linux. And my first attempt to use readline.
/********************************************************************/
This is what "ls -l /usr/lib/libreadline*" returns:
-rw-r--r-- 1 root root 300124 Jul 12 2006 /usr/lib/libreadline.a
lrwxrwxrwx 1 root root 16 Jul 17 2011 /usr/lib/libreadline.so -> libreadline.so.5
lrwxrwxrwx 1 root root 18 Jul 17 2011 /usr/lib/libreadline.so.4 -> libreadline.so.4.3
-rwxr-xr-x 1 root root 192228 Jul 14 2006 /usr/lib/libreadline.so.4.3
lrwxrwxrwx 1 root root 18 Jul 17 2011 /usr/lib/libreadline.so.5 -> libreadline.so.5.1
-rwxr-xr-x 1 root root 210256 Jul 12 2006 /usr/lib/libreadline.so.5.1
/********************************************************************/
This is what "uname -a" returns:
Linux localhost.localdomain 2.6.18-1.2798.fc6xen \
#1 SMP Mon Oct 16 15:11:19 EDT 2006 i686 athlon i386 GNU/Linux
THIS MEANS, among other things: "Fedora 6" with the kernel "2.6.18".
/********************************************************************/
This is what "gcc --version" returns:
gcc (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/********************************************************************/
This is what "rpm -qi readline" returns:
Name : readline Relocations: (not relocatable)
Version : 5.1 Vendor: Red Hat, Inc.
Release : 1.1 Build Date: Wed 12 Jul 2006 04:53:48 PM MST
Install Date: Sun 17 Jul 2011 01:20:21 AM MST Build Host: ls20-bc2-14.build.redhat.com
Group : System Environment/Libraries Source RPM:
readline-5.1-1.1.src.rpm
Size : 344881 License: GPL
Signature : DSA/SHA1, Wed 04 Oct 2006 05:31:01 AM MST, Key ID b44269d04f2a6fd2
Packager : Red Hat, Inc. <
http://bugzilla.redhat.com/bugzilla>
URL :
http://cnswww.cns.cwru.edu/php/chet/readline/rltop.htmlSummary : A library for editing typed command lines.
Description :
The Readline library provides a set of functions that allow users to
edit command lines. Both Emacs and vi editing modes are available. The
Readline library includes
additional functions for maintaining a list
of previously-entered command lines for recalling or editing those
lines, and for performing csh-like history expansion on previous
commands.
PLEASE NOTE: On July 17 2011 I made a mistake and I had to wipe out
the disk and install the system anew. Having several
disks make this a child's play.
/********************************************************************/
This is what "tcsh --version" returns:
tcsh 6.14.00 (Astron) 2005-03-25 (i386-intel-linux) options wide,
nls,dl,al,kan,rh,color,filec
PLEASE NOTE: I have been using the "C" shell for approx 25 years,
used Unix back in the '80s.
I also, changed to "bash" for a minute in an attempt
to solve the problem. No success.
/********************************************************************/
I have never used "gnome" only KDE, I do not know how to find
its version, I think it is KDE-3.4.
/********************************************************************/
I hope I thought of everything that is or may be relevant. And now, where are the trees that
prevent me to see the forest, please!!?? after two days of trying to find and move the trees
aside to see the forest I am really ashamed.
Thank you!!
Spyros Villios.