[Qt-interest] configuring Qt with MySQL
Ashish Singh
asinghmlists at gmail.com
Fri May 15 15:30:07 CEST 2009
Hi Vincent,
Thanks for the detailed explanation. Yes, copying the DLL to my application
directory works.
Can you also please guide me on doing this using Visual Studio as you
mentioned, so that I don't have to do it everytime?
Thanks,
Ashish
On Thu, May 14, 2009 at 8:49 PM, Vincent L. Damewood <lists at damewood.us>wrote:
> On Wed, May 13, 2009 at 3:11 PM, Ashish Singh <asinghmlists at gmail.com>
> wrote:
> > Hi Vincent, My mistake..what I wanted to say was that ' libmysql.dll' is
> in
> > the same location as '..MySQLServer5.1/lib/opt'. Actually both
> > 'libmysql.lib' and 'libmysql.dll' are at the same location.
> >
>
> This changes nothing. Your application needs to use libmysql.dll to
> communicate with a server. Therefore, you will need the libmysql.dll
> file in a place where your application can find it. The fact that it's
> in the same directory as the corresponding .lib file *DOES* *NOT*
> *MATTER*. Your application is not going to look there. Your
> application is going to look in the same directory it's in, some
> system directories, and the directories in your PATH environment
> variable. If you use the PATH variable, you will be assuming an
> environment that users of your application probably will not have, and
> therefore, any applications you write with this set up will break on
> other people's systems. If you copy the DLL file to a system
> directory, you will start the process for DLL Hell. So, in order not
> to depend on PATH, or cause DLL Hell, you will have to copy the DLL to
> the same directory as your application.
>
> Here's a document explaining the DLL search order.
> http://msdn.microsoft.com/en-us/library/ms682586.aspx
>
> > Isn't there a way to have this automatically taken care of instead of
> > copying the 'libmysql.dll' in the executable directory everytime?
>
> Get Visual Studio to do it for you.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090515/79eb4e5c/attachment.html
More information about the Qt-interest-old
mailing list