QMAKE - VERSION adds number to build library file

  • I use VERSION to set the version number in application and libraries. When i build applications everything works fine. When building .dll files the first version number is added after the filename:

    TEMPLATE = lib
    TARGET = mylib

    compiles to "mylib2.dll"

    any ideas how to change that?

  • @ck_ee

    You can make your own dll name function and give it to the QtPlugin.
    QString MyPlugin :: pluginName() const {
    return "PlaugnNameWhateveryoulike";

  • this looks like too much work for a simple problem like that .. why am i forced to a certain naming policy!?

  • Qt Champions 2017

    For various reasons that's how windows' libraries ordinarily handle versioning (if you look the Qt 5 dlls, you'll see the same thing).
    On Linux it works as expected, I get:

    • libraryname.so.2.10.30

    with tree additional symbolic links that point to the aforementioned shared object:

    • libraryname.so.2.10
    • libraryname.so.2
    • libraryname.so

    If you want to manipulate the name of the target, use the TARGET variable.

    Kind regards.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.