visual-studioqtdllcompilation

Compile QT and append a suffix to the generated DLLs name


Due to this error, I need to compile QT and generate the whole set of libs and DLLs with a custom suffix. Something like Qt5Core_MySuffix.dll, Qt5Gui_MySuffix.dll, Qt5Core_MySuffix.lib, and so on...

How can I do that? I am using this and this tutorials to perform the compilation.

Do I need to edit the configure.bat file?

Environment: Windows7 MSVC2015


Solution

  • You can do this on configuration step. Where is an option qtlibinfix:

    -qtlibinfix <infix> Renames all Qt* libs to Qt*<infix>.
    

    Just add it to the configure command from you link:

    configure -static -qtlibinfix MyInFix -debug-and-release -prefix “C:\Qt\Static\5.7.0” -platform win32-msvc2015 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sql-sqlite -qt-sql-odbc -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests 
    

    EDIT: I'm not sure if the BUG with not adding InFix to the Qt plugins is fixed. If not, you can easily fix it yourself. Take a look here