PDA

View Full Version : How I link a dll?



brevleq
10th December 2007, 23:07
Hey Guys!!
I'm here again!! I still didn't resolve that problem: http://www.qtcentre.org/forum/f-qt-programming-2/t-qpsql-driver-in-windows-10549.html
but I really believe is a linking dll problem!! Why should I put a lot of dlls in my application folder?? I really believe its wrong!!

I've deleted all of these dlls, and compiled again my program! The result is:

mingwm10.dll not found, but if I go to qt or mingwm folder I can find this dll!! The compiler isn't linking the dlls!! I think its the cause of my problem!!

How can I link all dlls my program need??

jacek
10th December 2007, 23:19
Why should I put a lot of dlls in my application folder??
To avoid DLL hell (http://en.wikipedia.org/wiki/DLL_hell) and not to destroy other applications.


How can I link all dlls my program need??
You have to copy all necessary DLLs to a place where your system looks for them. For example to the directory where the executable is.

sabeesh
14th December 2007, 05:00
Hi,
I think it is not a good solution.
Try to create .lib files from that .dll and include that lib in to your program. I am not sure that, you can solve your problum. Try in google for a converter for .dll to .lib.
Download it and try it.
:)

c_07
15th December 2007, 03:39
Can you use static linking (http://doc.trolltech.com/4.3/deployment-windows.html#static-linking) to link into a single executable?