Basic deployment question

  • Sorry if it is too basic to ask in this forum

    I have Qt application, I am deploying it on different desktop, i copy every thing (exe , all required Qt dll )in one folder it works (keeping plug in in another dir in parent dir), but when I am integrating my Qt app(which is a tool for big app) and copying Qt dll in different folder and my Qt app.exe in different folder it is not working. Do I need to register my dll ( i thought this regsvr32 stuff is for COM only)

    This structure works: C:\MainApp\App\Tool(Qtapp.exe All Qt dll and imageformats/pluing dll )

    My final Dir strucuture is like this which does not work

    C:\MainApp\lib\ ( here I have all my Qt dll and imageformats\plugin dll)
    C:\MainApp\App\Tool(my Qt app is here)

    What do i need to do to make it working I saw this "link": but it does not help

  • Have you try?:
    It didn't help?

  • No but if I do this, then wont I again make my app and restricted to this dir structure?

    now I am wondering how I should make my app totally independent from this path stuff. Is this possible at all to keep my exe at my own desired location and lib at totally different location .
    I mean at deploy time can I really decide this path or do i always have to use addLibraryPath stuff?

  • In theory (i haven't try this :) ) when you start your application you can read path from some *.ini file or register, and call QApplication::addLibraryPath() or QApplication::setLibraryPaths().

  • Moderators

    Better go with:
    qApp->addLibraryPath(qApp->applicationDirPath() + "/../../../lib");

    This prevents surprises when you launch your app from a link, or from different $PWD (

Log in to reply

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