This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Change in command line order behaviour
- To: egcs at cygnus dot com
- Subject: Change in command line order behaviour
- From: Ross Alexander <rossa at stimpy dot math dot auckland dot ac dot nz>
- Date: Thu, 13 Nov 1997 09:49:24 +1300
Will trying to compile netkit-ftp-0.10 they had the following
test in the autoconf script. The gist to the problem follows.
stimpy:~$ cat test.c
#include <stdio.h>
#include <readline/readline.h>
int main(int argc, char *argv[])
{
readline("goo");
}
stimpy:~$ gcc test.c -lreadline -ltermcap
stimpy:~$ gcc -lreadline -ltermcap test.c
/tmp/cca059941.o: In function `main':
/tmp/cca059941.o(.text+0x9): undefined reference to `readline'
collect2: ld returned 1 exit status
----------------------------------------------------------------------
The script failed to detect libreadline because it became before the
test.c file but I don't remember having this problem when I originally
compiled the program a while back.
Ross