[Interest] qmake: Building a shared object which is not a lib

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Wed Jun 27 13:32:31 CEST 2012

On Wed, Jun 27, 2012 at 4:29 PM, Christian Gagneraud <chris at techworks.ie> wrote:
> Hi there,
> I would like to build a shared object (PySide module) using qmake.
> My first attempt was to use TEMPLATE=lib, which worked except that I
> have no control on the name of the output file.
> Is there a way to override the name of the generated shared object file?
> Basically using TEMPLATE=lib, the generated file is called
> libXYZ.so.1.0.0 (and the usual links to it up to libXYZ.so). I would
> like to generate instead XYZ.so, without any versioning, links, etc...

On *nix's I think the libXYZ is a convention. The application that
want to link to this library omit the 'lib' prefix when passing the
name to the linker. If you don't want the lib prefix then I guess you
will have to play around with its 'soname'. You might have to pass
some linker options to tell it which library you're using (if not
using the std name). I'm not too sure about this though as I've never
tried it myself.

If you build a plugin, then the version links are not created, and
simply the libXYZ.so will be created (the lib prefix is still there).

Why do you want to remove the lib prefix btw?


> Any help would be grateful.
> Chris
> --
> Christian Gagneraud,
> Embedded systems engineer.
> Techworks Marine
> 1 Harbour road
> Dun Laoghaire
> Co. Dublin
> Ireland
> Tel: + 353 (0) 1 236 5990
> Web: http://www.techworks.ie/
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

More information about the Interest mailing list