user702905
user702905

Reputation: 71

How do I prevent Qt Creator from generating multiple .so files for the same library?

I am using Qt Creator to generate a library, and while it does work, it generates four versions of the file that, as far as I can tell, are identical to one another except that they are linked together. The files are labeled as such: libFile.so, libFile.so.1, libFile.so.1.0, and libFile.so.1.0.0. I only want to keep the libFile.so file. How do I prevent the other files from being generated and being auto-linked together?

Upvotes: 3

Views: 1107

Answers (2)

divanov
divanov

Reputation: 6339

There is only one shared object, rest are just symbolic links s to it. This is how shared object naming works in Unix-like systems in order to support backwards-compatibility. Read more about soname on Wikipedia.

Upvotes: 4

nomenas
nomenas

Reputation: 111

qmake generates three targets for shared library configuration. One option to avoid creation of symbolic links is to set plugin configuration into your .pro file:

CONFIG += plugin

or you can put post-build script for removing of symbolic links in destdir folder.

Upvotes: 5

Related Questions