Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to distribute QtSql APP
Qt 6.11 is out! See what's new in the release blog

How to distribute QtSql APP

Scheduled Pinned Locked Moved General and Desktop
8 Posts 6 Posters 5.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hungchuviet
    wrote on last edited by
    #1

    My app work fine on my computer (Debug, release).
    When I copy app files to another computer (All dll file needed) and run app, this Sql error happend: "Driver not loaded"
    -List files are:

    1. QtCore4.dll
    2. QtGui4.dll
    3. QtSql4.dll
    4. SqlIte.dll
    5. SqlIte3.dll
    6. mingwm10.dll
    7. libgcc_s_dw2-1.dll
    8. qsqlite4.dll
      9.myapp.exe
      Help me to resolve this problem
      Thanks you very much!
    1 Reply Last reply
    0
    • F Offline
      F Offline
      fcrochik
      wrote on last edited by
      #2

      Just guessing here but I assume that the plugins for the different database engines have to be on a special place or that you need on your application to tell the qt "engine" where to search for them. I think in some cases the location of the plugins is actually hard-coded.

      Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

      1 Reply Last reply
      0
      • I Offline
        I Offline
        IrQX
        wrote on last edited by
        #3

        You also should make directory plugins/drivers/sqldrivers in root of your application directory. Sorry I forgot name of directory, that you need. Then copy database drivers libraries, that you have used.

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hungchuviet
          wrote on last edited by
          #4

          Thanhk you!
          I've done all of above steps, but my app do not run.
          All file that my app needed in the same diretory of myapp.exe.
          I'm newbie with QtSQL, so I don't know how to fix this.
          Help me!

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on last edited by
            #5

            In situations like this I recommend to use a tool like procmon (windows) or strace (linux) to watch which files the application opens. That list usually provides some idea about what is missing and where it looks for that stuff.

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hungchuviet
              wrote on last edited by
              #6

              Thanks you very much!
              I've found that:
              I must create a directory named sqldrivers at root of my app directory and copy all Sql dll into it.
              My app work fine.
              thanks you!

              1 Reply Last reply
              0
              • S Offline
                S Offline
                stukdev
                wrote on last edited by
                #7

                I don't know SqlIte3.dll and SqlIte3.dll.
                For me application i need only put qsqlite4.dll in sqldrivers.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andre
                  wrote on last edited by
                  #8

                  Note that this directory requirement exists for all Qt plugins, not only the sql drivers. It also works for image formats, codecs and other plugins.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved