How to distribute QtSql APP
-
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:- QtCore4.dll
- QtGui4.dll
- QtSql4.dll
- SqlIte.dll
- SqlIte3.dll
- mingwm10.dll
- libgcc_s_dw2-1.dll
- qsqlite4.dll
9.myapp.exe
Help me to resolve this problem
Thanks you very much!
-
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.
-
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! -
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.
-
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!