Thursday, 14 November 2019

Resolving conflicts between Qt versions

The trueSKY plugin for Unreal uses Qt dll's for UI. Unfortunately so do some other plugins. Because Windows just uses whichever version of a dll was loaded first, this leads to (for example) crashes in trueSKY UI because it tries to access the wrong parts of a dll loaded by Quixel Megascans.

To solve this we recompile Qt using the switch  -qtlibinfix to modify the output filenames. Thus instead of Qt5Core.dll we get Qt5Core_simul.dll etc.

No more conflicts!

UPDATE: To compile Qt, follow the instructions at https://wiki.qt.io/Building_Qt_5_from_Git. For example, for me on Windows, I must git-clone the repo, install perl (!) and call perl init-repository.

Then, I create a subdirectory BUILD_DIR at subdirectory "build/x64". From there, I call:

call ../../configure.bat -qtlibinfix %QT_INFIX% -prefix %BUILD_DIR%\qtbase -skip qtwebengine -developer-build -%reldeb% -force-debug-info -no-warnings-are-errors  -L kernel32 -opengl desktop -opensource -make libs -make tools -nomake examples -nomake tests -platform win32-msvc -confirm-license -no-compile-examples -qt-zlib -plugin-manifests -no-angle -qt-freetype -qt-libjpeg -qt-libpng -D U_STATIC_IMPLEMENTATION %INC% %LIBDIRS% %IC%

QT_INFIX is _simul, while INC LIBDIRS and IC are extra compile options.

Finally, we run nMake to build Qt.

7 comments:

  1. Ummmm what? I am glad you found the cure but I don't know what you mean by recompile. Please elab...

    ReplyDelete
  2. Roderick, you are the man! However, this is above my head to try to resolve. I appreciate you taking the time to explain. Most appreciated. Maybe I can run Truesky as a standalone... or something.

    ReplyDelete
    Replies
    1. :-) We'll have an update in the next couple of days - no need to build your own Qt!

      Delete
    2. Roderick... thanks for this. Hope this self-less act is returned to you. Again... appreciated.

      Delete
  3. I know a little about git and using repo's... so I'll search the web for a step-by-step. Thanks again.

    ReplyDelete
  4. Hey... just as a head's up. I've referenced this blog on a YouTube comment. You might be getting popular. Some other people had problems with the qt bug from Truesky... Hope that's okay.

    ReplyDelete
  5. Saw the Plug-in update in the Unreal Editor... thanks if you had something to do with that.

    ReplyDelete