[Qt-interest] soname for shared library
Girish Ramakrishnan
girish at forwardbias.in
Fri Apr 10 20:42:27 CEST 2009
Eric Berryman wrote:
> Hello!
>
> What do I need to put in my .pro file to have qmake use -soname?
>
> I am using the lib template, and I would like the target to include
> the version i.e. lib<name>.so.1.2.
>
> I tried putting:
> VERSION = 1.2
> TARGET = $$TARGET_x.y.z
>
> this did not work.
>
The soname is automatically set based on VERSION. You will
-Wl,soname,xxx in the linker line. If you set TARGET to 'foo' and
VERSION to 1.2, it will create libfoo.so.1.2.0 (and 2 symlinks). The
shared object itself which will have the soname libfoo.so.1 (which you
can verify with readelf).
Girish
More information about the Qt-interest-old
mailing list