This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Change in command line order behaviour
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: Change in command line order behaviour
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Wed, 12 Nov 1997 17:37:05 -0500
- Cc: Ross Alexander <rossa at stimpy dot math dot auckland dot ac dot nz>, egcs at cygnus dot com
>>>>> Richard Henderson writes:
Richard> On Thu, Nov 13, 1997 at 09:49:24AM +1300, Ross Alexander wrote:
>> 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
Richard> Unix has had this behaviour since the beginning of time. Order matters
Richard> with libraries. You must put the library -after- whatever uses it.
Not AIX! (:^) Just another one of the unique features of IBM's
implementation of Unix which utilizes a garbage collecting linker. The
above failure occurs often when someone ports an AIX application to
another brand of Unix.
With asbestos shield in place,
David