views:

78

answers:

1

Hello,

I'm trying to build a dynamic library on Linux using qmake. Here is my .pro file:

TEMPLATE = lib
TARGET = sqxUiBase
QT += core gui   
CONFIG += dll    
INCLUDEPATH += ../../public/include   
DEPENDPATH += .
UI_DIR += ../GeneratedFiles    
RCC_DIR += ../GeneratedFiles   
CONFIG(release, debug|release) {
    DESTDIR = ../lib/release
    LIBS += -L"../lib/release"
    MOC_DIR += ../GeneratedFiles/release
    OBJECTS_DIR += release
} else {    
    DESTDIR = ../lib/debug
    LIBS += -L"../lib/debug"
    MOC_DIR += ../GeneratedFiles/debug
    OBJECTS_DIR += debug
} 

include(sqxUiBase.pri)

The sqxUiBase.pri file contains the list of files that need to be built.

Now, the problem is that whatever I do, the resulting file is always named sqxUiBase.so.1.0.0, with a bunch of symlinks (sqxUiBase.so, sqxUiBase.so.1 and sqxUiBase.so.1.0) pointing to it. How can I make it so that there's only a sqxUiBase.so file and no links?

Thanks!

+4  A: 

What you are looking for is making a plugin.

Add CONFIG += plugin to your project file, and qmake will generate a Makefile that builds a libFoo.so file, without the numbered links

Fred
Thanks! That worked brillantly.
Etienne de Martel
As an additional option, you can specify an empty version number in the .pro file with "VERSION=" (without quotes). I can only attest to it working under Windows.
Arnold Spence