Solved

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

Posted on 2008-10-21
8
2,388 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
  • 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How can I build my own IDE using ASP.NET MVC? 2 54
unable to insert record into a table 2 40
SubQuery link 4 36
Where are the c++ header files to use in Eclipse? 4 25
As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Foreword This article was written many years ago, in the days when PHP supported the MySQL extension (http://php.net/manual/en/function.mysql-connect.php).  Today (http://php.net/manual/en/migration70.removed-exts-sapis.php) you would not use MySQL…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

820 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