Results 1 to 6 of 6

Thread: [Release] problem with mysql, relaease build on another machine

  1. #1
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    112
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Unhappy [Release] problem with mysql, relaease build on another machine

    Hey
    I am having a big problem (maybe not so big ), 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


    I now have no idea how to fix this bug, so any kind of suggestion would be much more than helpful

    Tomasz
    Last edited by kornicameister; 29th September 2010 at 19:00. Reason: wrong information about installed xp

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default 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.

  3. #3
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    112
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: [Release] problem with mysql, relaease build on another machine

    Quote Originally Posted by Lykurg View Post
    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
    Qt Code:
    1. [Files]
    2. Source: "C:\Users\kornicameister\Documents\My Dropbox\Programming\Projects\C++\Agatom\AgatomProject-build-desktop\release\finish\AgatomProject.exe"; DestDir: "{app}"; Flags: ignoreversion
    3. Source: "C:\Users\kornicameister\Documents\My Dropbox\Programming\Projects\C++\Agatom\AgatomProject-build-desktop\release\finish\dll2\*"; DestDir: "{app}"; Flags: ignoreversion
    4. Source: "C:\Users\kornicameister\Documents\My Dropbox\Programming\Projects\C++\Agatom\AgatomProject-build-desktop\release\finish\dll\*"; DestDir: "{win}\System32"; Flags: ignoreversion recursesubdirs createallsubdirs
    5. Source: "C:\Users\kornicameister\Documents\My Dropbox\Programming\Projects\C++\Agatom\AgatomProject-build-desktop\release\finish\sources\*"; DestDir: "{app}\sources"; Flags: ignoreversion recursesubdirs createallsubdirs
    To copy to clipboard, switch view to plain text mode 

    now in folder dll are the files I've enumerated before and these files are copied into to
    Qt Code:
    1. (disk_letter):\Windows\System32\
    To copy to clipboard, switch view to plain text mode 
    in folder dll2 are the files dragged from
    Qt Code:
    1. ~\qt\plugins\sqldrivers
    To copy to clipboard, switch view to plain text mode 
    (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 ?

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default 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.

  5. The following user says thank you to Lykurg for this useful post:

    kornicameister (29th September 2010)

  6. #5
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    112
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default 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
    My schedule makes my cry
    My works makes my laugh
    My life makes... oh...no....

  7. #6
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    112
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: [Release] problem with mysql, relaease build on another machine

    I finally realized I've solved my problem when I'd seen this error


    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
    Last edited by kornicameister; 5th October 2010 at 15:42.
    My schedule makes my cry
    My works makes my laugh
    My life makes... oh...no....

Similar Threads

  1. Replies: 3
    Last Post: 9th February 2011, 21:30
  2. Build release and run error
    By gabriele in forum Newbie
    Replies: 11
    Last Post: 16th February 2010, 22:23
  3. Replies: 3
    Last Post: 3rd December 2009, 17:12
  4. XCode and Qt4.3 Release Build
    By themolecule in forum Qt Programming
    Replies: 0
    Last Post: 12th August 2007, 08:20
  5. .png not displayed with release build
    By mnemonic_fx in forum Qt Tools
    Replies: 1
    Last Post: 5th July 2007, 10:41

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.