Solved

[Qt + MySql] Deploying an Application... Driver not load on other computer

Posted on 2008-10-21
8
2,417 Views
Last Modified: 2013-11-23
Hi everybody,

I created an application that use a mysql , it work very well at home where qt and the driver are install.

When I try my application on any others computer i got the error message "Drivers not load".

All the DLL are in places, it seems I need to add something to attach the drivers to my application.

Help me plzz !!
0
Comment
Question by:tinzaker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 3

Expert Comment

by:tdor
ID: 22772176
Hello tinzaker,

try to register the drivers on the "away from home" machine
from start menu/run

regsvr32.exe "path to the drivers" (with the " if you have spaces in the path)
ex: regsvr32.exe "c:\my app\my project\needed_dll.dll"

Regards,

tdor
0
 

Author Comment

by:tinzaker
ID: 22772775
I tried : regsvr32.exe C:\Documents and Settings\Alexis\Bureau\File\Programation\C++\Projet\SE\release\QtSql4.dll

but i got this message error : LoadLibrary("Path to dll") has failed, the specified module could not be found.

I don't really know where is the driver of mysql... but i know that i need the QtSql4.dll
It is for mysql uses.
0
 

Author Comment

by:tinzaker
ID: 22772789
oups i forgot the "

but i still have this error : (path to dll) was loaded but the entry point DLLregisterserver cannot be found
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
LVL 3

Accepted Solution

by:
tdor earned 235 total points
ID: 22779610
Hi,

Some things come to mind
- the application is looking for that .dll in a specific place
- the .dll is registered more then once in registry
- this .dll is dependent of another .dll  (use dependency walker to find out if that's the case - http://www.dependencywalker.com/) (I'm thinking of QtGui4.dll, QtCore4.dll QtXm14.dll, mingwm10.dll, qsqlite4.dll, etc)
- according to http://support.microsoft.com/kb/249873 the "Dllname may not be exported, or a corrupted version of Dllname may be in memory. Consider using Pview to detect the file and remove it. ". Or a different version of the .dll is in memory (pview can be found here http://www.teamcti.com/pview/prcview.htm. You'll be able to view the .dlls in memory by going to view menu and choosing module usage. Left click on the .dll and choose Filter Process List to see what's using that dll)
- go to Control Pannel / Administrative Tools and start "Data Sources (ODBC)". Enable tracing. See if in the logs there is some aditional info about the error
- download the MDAC checker to see if no ODBC driver is corrupt (http://www.microsoft.com/downloads/details.aspx?familyid=8f0a8df6-4a21-4b43-bf53-14332ef092c9&displaylang=en)




tdor
0
 

Author Comment

by:tinzaker
ID: 22781518
If I look with dependency walker everything is in my project folder on every computer

but when I look out my program with pview, on my computer there some dll that are loaded in the Qt folder.

If I'm not working on my computer, the dll that were in the qt folder are not even mention... I think it's these dll that my program need, but how to attach them to it.


what are ODBC driver... I think I have a link with Visuall...

my compiler is mingw by the way
0
 
LVL 3

Expert Comment

by:tdor
ID: 22781715
Unfortunately I do not have experience with mingw
Try to put in the folder (on other computer) all the dlls that are missing from the QT folder
register then with regsvr32

About the ODBC -> http://en.wikipedia.org/wiki/Odbchttp://en.wikipedia.org/wiki/Odbc

0
 

Author Comment

by:tinzaker
ID: 22782733
Thanks man for your help, Ifinally solved my problem after a few day of hard work !!

It's just that you need to specified to your application where you put the driver.

I created a folder named plugins, and add to it the containt of qt plugins folder

The Pview really help me and this web page too, http://doc.trolltech.com/4.1/deployment-windows.html#creating-the-application-package

You just need to go on Pview chack all the dll that are not in the project folder and them.
You have no had this function with the pash of your plugins: QCoreApplication::addLibraryPath("./plugins")

If you have any question just ask me by this post ! or alexj13@videotron.ca

0
 

Author Closing Comment

by:tinzaker
ID: 31508512
I put you good mark because you answered fast !! and I found a perfect clean solution because of you

Thanks man !!!!

You really Helped me
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question