RE: is there any way to change the order of name resolution in linking (aside from putting the libraries in the right order?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan

I think -l defaults to .so and does not include .a if the extension is
not explicitly mentioned. However, I am not sure if anything in this
area changed in the latest gcc.

Regards

Vardhan

-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of Dan Hitt
Sent: Thursday, September 27, 2012 4:17 PM
To: Jonathan Wakely
Cc: gcc-help@xxxxxxxxxxx
Subject: Re: is there any way to change the order of name resolution in
linking (aside from putting the libraries in the right order?)

On Thu, Sep 27, 2012 at 1:08 PM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx>
wrote:
> On 27 September 2012 21:04, Dan Hitt wrote:
>>
>> I was not able to use the -l abbreviation
>
> Why not?

It didn't resolve the reference.

To be really specific here (except that i have to suppress some of the
dozens of characters in the command), the command generated was:

gcc-4.6  -Wl,--whole-archive,-lX11,--no-whole-archive  [[[other stuff
deleted]]]

And that command gives the same result as just putting -lX11 first (as
opposed to putting it last, which resolves everything).

(It may be that the -l option somehow signifies *.so these days?
Because it certainly gives a much smaller executable when it works, and
i had to use the *.a forms with --whole-archive in order to make it
work?)

dan



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux