[Qt-interest] configuring Qt with MySQL
Vincent L. Damewood
lists at damewood.us
Wed May 13 23:36:06 CEST 2009
On Wed, May 13, 2009 at 2:09 PM, Ashish Singh <asinghmlists at gmail.com> wrote:
> On Wed, May 13, 2009 at 3:27 PM, Vincent L. Damewood <lists at damewood.us>
> wrote:
>>
>> On Wed, May 13, 2009 at 11:18 AM, Ashish Singh <asinghmlists at gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I have been trying to get Qt to work with MySQL without any luck. When I
>> > run
>> > a 2 line test code, it comes back with a message saying- "This
>> > application
>> > has failed to start because LIBMYSQL.DLL was not found.
>>
>> Your Qt application can't find the MySQL client library. Try finding a
>> file called libmysql.dll in your MySQL installation and copy it to the
>> directory your Qt application is in, or in the directory your QtMySQL
>> plugin is in.
>
> Thanks for replying. The 'libmysql.lib' file is actually in my
> '..MySQLServer5.1/lib/opt' folder. I have already given this path to Qt at
> the time of configuration. Shouldn't that take care of it?
No. Your program is looking for the file libmysql.dll, not
libmysql.lib. It All this did was give Qt the information needed to
'talk' to the DLL file. You will still need the DLL, and you will need
it in a place where your application can find it. The safest place is
in the same directory as your executable.
Have a look at these:
http://msdn.microsoft.com/en-us/library/1ez7dh12.aspx
http://msdn.microsoft.com/en-us/library/f0z8kac4.aspx
More information about the Qt-interest-old
mailing list