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?
Each file has a different number at the end of it. These numbers represent versions of the library. They're very important as it's these versions that determine the role of each file. They're two popular versioning schemes.
Yes, the ". 1" indicates the version number. This makes it possible to have multiple versions of the same library side-by-side, whereas the most common version has a link with no version number. If there is no need to distinguish between different versions, the version suffix might not be present.
A file with the . SO file extension is a Shared Library file. They contain information that can be used by one or more programs to offload resources so that the application(s) calling the SO file doesn't have to actually provide the file.
The SO file stands for Shared Library. You compile all C++ code into the.SO file when you write it in C or C++. The SO file is a shared object library that may be dynamically loaded during Android runtime.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With