List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:November 23 1999 10:56am
Subject:MYSQL for Windows
View as plain text  
>>>>> "Robert" == Robert J Daino <rjdaino@stripped> writes:

Robert> Help!!
Robert> I have downloaded the shareware version of MySQL-Win32 (based on MySQL
Robert> 3.21.29)  and installed it.  Then I downloaded MySQL 3.23.6a clients,
Robert> libraries and include files for Win32 and overlayed that onto my 3.21.29
Robert> installation as told by a MySQL savvy person.  The documentation does
Robert> not line up with the header files as far as I can tell and therefore I
Robert> cannot determine the correct action to take to my problem.

Robert> My problem is that I have an existing application that runs beautifully
Robert> with MySQL 3.22.20a under Solaris.  When I try to link it with my Win32
Robert> MySQL installation, the following linker errors:

Robert> unresolved external symbol _mysql_fetch_row
Robert> unresolved external symbol _mysql_free_result
Robert> unresolved external symbol _mysql_real_connect
Robert> unresolved external symbol _mysql_init
Robert> unresolved external symbol _mysql_close
Robert> unresolved external symbol _mysql_store_result
Robert> unresolved external symbol _mysql_query

Robert> My link command is including the libmysql.lib  and mysqlclient.lib
Robert> libraries provided with the MySQL installation as described above.  I
Robert> know that the linker is locating these libraries because if I move them
Robert> out of the folder that is defined in the link command, they is an error
Robert> regarding not finding those libraries.  The mysql.h and other headers
Robert> are being included and have the prototypes for the above functions.

Robert> Any suggestions?  I need to complete this project fast or the use of
Robert> MySQL will be relooked at.  I really believe that MySQL is the way to go
Robert> but I can't prove it with these problems in my way.

Robert> Bob

Hi!

The online manual at http://www.mysql.com/doc.html should be up to
date with the C API:s

Which compiler / linker are you using ?

Note that you only need to include mysqlclient.lib OR libmysql.lib  ;
mysqlclinet.lib is for static linking while libmysql.lib is for
dynamic linking.

Did you try the test program in

\mysql\examples\libmysqltest\ ?

This uses libmysql.lib (by default) and links with VC++ without any problems.

Note that if you are using VC++ 5.0, you have to install the VC+5.0
service pack 3 to get this to work.

If you are using the Borland compiler:

First thing to do is to create Borland import library for libmysql.dll with
Borland  "implib" utility:
imlib libmysql.lib libmysql.dll

Than you have to link your program with this import library and it should
work.

Note that if you can't solve this with the standard MySQL
client distribution, just mail me and I can give you access to the
MySQL Win32 source code so that you can solve this problem by
compiling our own libraries!

Regards,
Monty
Thread
MYSQL for WindowsRobert J. Daino22 Nov
  • MYSQL for WindowsMichael Widenius23 Nov