[Release] problem with mysql, relaease build on another machine
Hey
I am having a big problem (maybe not so big :p), but it stops me from launching my application under another os (to be specific -> virtually installed Xp for testing before final release)
The bug of course does not affect my local release build
I copied all required dll's into {win}\system32 folder from C:\{qtdir}\qt\bin according to the tip from here
coppied dll's file :
- QtSql4.dll (as my application uses MySQL)
- QtCore4.dll
- QtGui4.dll
- mingwm10.dll
- libgcc_s_dw2-1.dll
and additionally, I've copied the following dlls (also from C:\{qtdir}\qt\bin) after bug occurred, but it did not solved the problem
- libmysql.dll
- qsqlmysql4.dll (build by me so as to be able to use mysql in qt programming, so it's not from above folder)
the error I get is on screenshot
http://wstaw.org/m/2010/09/29/error_...00x300_q85.jpg
I now have no idea how to fix this bug, so any kind of suggestion would be much more than helpful
Tomasz
Re: [Release] problem with mysql, relaease build on another machine
In which folders you have put the files? Debug where Qt is searching for the libraries. Also make sure you have to right mysql.dll.
Re: [Release] problem with mysql, relaease build on another machine
Quote:
Originally Posted by
Lykurg
In which folders you have put the files? Debug where Qt is searching for the libraries. Also make sure you have to right mysql.dll.
here is the output from the installation script
Code:
[Files]
Source: "C:\Users\kornicameister\Documents\My Dropbox\Programming\Projects\C++\Agatom\AgatomProject-build-desktop\release\finish\AgatomProject.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\kornicameister\Documents\My Dropbox\Programming\Projects\C++\Agatom\AgatomProject-build-desktop\release\finish\dll2\*"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\kornicameister\Documents\My Dropbox\Programming\Projects\C++\Agatom\AgatomProject-build-desktop\release\finish\dll\*"; DestDir: "{win}\System32"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "C:\Users\kornicameister\Documents\My Dropbox\Programming\Projects\C++\Agatom\AgatomProject-build-desktop\release\finish\sources\*"; DestDir: "{app}\sources"; Flags: ignoreversion recursesubdirs createallsubdirs
now in folder dll are the files I've enumerated before and these files are copied into to
Code:
(disk_letter):\Windows\System32\
in folder dll2 are the files dragged from
Code:
~\qt\plugins\sqldrivers
(this possible solution I found in another thread but it failed to help)
other files are irrelevant for this bug
I assume Qt searches for them in {win}\System32 dir, as without dll files (such as QtCore4.dll and others) the application used to failed to launch every time on the virtual machine
by right mysql.dll you mean what, to be exact ?
Re: [Release] problem with mysql, relaease build on another machine
It seems you are not using the standard directories. See http://doc.qt.nokia.com/4.7/deployment-windows.html. Also what is QCoreApplication::libraryPaths() returning. Did Qt look on the "right" places and could find your plugins?
I put the mysql dll in the folder where my app is, and the plugin in a folder called sqldrivers.Try if that works for you.
Re: [Release] problem with mysql, relaease build on another machine
I will try to follow Your advices and post the reply as soon as I can
Re: [Release] problem with mysql, relaease build on another machine
I finally realized I've solved my problem when I'd seen this error
http://wstaw.org/m/2010/10/05/err_JPG_300x300_q85.jpg
that means of course that mysql's driver has been successfully loaded and no 'Driver not loaded' error occurred to me this time
here is how I did it, according to the one of manuals Lykurg had sent
- created sqldrivers dir in the main dir of my application
- add library path, using suitable method from QApplication class, path must points at sqldrivers folder, not it's content
and that's it
I hope my joy is not premature :)
But everyting worked under control of client machine
One more question, does the client machine require MySQL Community Server configured as Client Machine ? I think I made myself quite clear at this point :)