This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Change in command line order behaviour


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]