Important: Please read the Qt Code of Conduct -

Looking for developer help who use QT 5.12 in static and VS2015 to produce static exe

  • Hi,

    I'm currently new on Qt and I developed an interface for work.
    This interface is quiet simple and use the basic functionalities of Qt (Widgets, Gui, Charts).
    My objective is to be able to open a webpage in a "widget" inside my interface and support recommanded to use Visual Studio 2017 in place of QtCreator.
    I started to move to Visual Studio 2015 (because I already have it) to test my program but I encounter difficulties to produce a static executable.
    I'd like to know if someone is using Visual Studio 2015 and QT 5.12 in static to discuss the process ?

    (Qt static compilation OK, my interface compilation OK, run the executable fail due to dll problem but it should be static "MTd" option apply).

    Thank you in advance.

  • Qt Champions 2017

    That's neither Qt-related, nor MSVC related, it's how linking is done. Even if you comile and link Qt statically in the general case its dependencies will be linked as dynamic libraries. To have everything contained in the application binary you need to supply every single dependency as a static library. This includes, among others, the MSVC runtime libraries ...!

  • Hi thank you for your reply

    I added in the linker every libs needed for my interface and also the static lib created by another solution. Everything seems to link very well but when I'm trying to used "Local Windows Debugger" it crashes every time. If it needs some information from MSVC it should take it naturally on startup ?

    How can I know which MSVC runtime libraries are needed ?

  • Lifetime Qt Champion

Log in to reply