[lazarus] .so not static?

Marc Weustink weus at quicknet.nl
Fri Aug 13 13:20:11 EDT 1999


At 14:18 13-08-99 +0200, Michael Van Canneyt <michael.vancanneyt at wisa.be>
wrote:
>On Fri, 13 Aug 1999, Samuel Liddicott wrote:
>> > -----Original Message-----
>> > From: Samuel Liddicott [mailto:sam at campbellsci.co.uk]
>> > Sent: 13 August 1999 12:03 PM
>> > To: lazarus at miraclec.com
>> > Subject: RE: [lazarus] Nearly there.
>> >
>> > /usr/bin/ld: cannot open -lgtk: No such file or
>> > directory
>> 
>> OK, I rollod my own ld to print the args and found them to be:
>> 
>> ld -dynamic-linker=/lib/ld-linux.so.2 -o ./lazarus ./link.res
>> 
>> So it seems link.res is the problem file.  Lo, and behold at the bottom of
>> ./link.res is:
>> 
>> -lXi
>> -lXext
>> -lX11
>> -lm
>> -lgtk
>> -lgdk
>> -lglib
>> -lc
>> 
>> Hmm.  Why does it only complain about -lgtk?  I delete a few lines from the
>> file and find it complains about -lg*
>> 
>> I think its because all my gtk, gdk, glibs are .so and perhaps this is
>> trying to static link.
>> 
>> How do I tell it to dynamic link?
>
>Add -k-Bdynamic to the compiler options. '-k' tells the compiler to add
>whatever comes after it to the linker options.
>
>But it seems to me that you are on a aout system, and my guess is that the
>gtk.so libraries are ELF shared libraries; in that case you cannot link them
>to your binary.

??? Sound familiar. When you look at he options for ld it says 

      -l<ar>  Add an archive file ar to the  list  of  files  to
              link.  This option may be used any number of times.
              ld will search its  path-list  for  occurrences  of
              lib<ar>.a for every ar specified.

So it looks like ld is looking for some .a libs,  which arent there (at
leats i do not have them, it's aout?)

I just replaced every occurance of -lX by path to its .so couter part and
it worked. It didn't bother about the ins an outs of why.

Marc









More information about the Lazarus mailing list