Re: [Dev-C++] Writing a mySQL client
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Devin S. <dev...@bu...> - 2001-04-13 17:36:43
|
I am getting the same problem trying to compile a sample little test
program.
Here is the program I have written to test it:
#include <stdio.h>
#include <mysql/mysql.h>
int main(int argc, char *argv[])
{
MYSQL *mysql;
mysql_init(mysql);
mysql_close(mysql);
return 0;
}
It is being linked with libmysql.a , and libmingw32.a.
I downloaded the Borland version of the library and used impdef and then
dlltool to create the import library. I'll update the dlltool program and
see if I can fix the problem.
----- Original Message -----
From: "Yeoh HS" <ye...@ya...>
To: <dev...@li...>
Sent: Friday, April 13, 2001 12:22 AM
Subject: [Dev-C++] Writing a mySQL client
> Hi,
>
> I'm trying to use Dev-C++ 4 to write a simple Win32 client to logon to a
> mySQL server.
>
> I have mySQL installed on Win98 standalone PC. This is a fresh install.
>
> The Dev-C++ project file is set to the include file mysql.h and the lib
file
> libmysql.lib.
> There is also a libmysql.def in the include dir and the dll file
> libmysql.dll is in the working directory.
>
> My test program compiles okay but there is a linker error.
>
> Here's the linker error:
> d:\devcpp\login.o(.text+0x5c):login.cpp: undefined reference to
> `mysql_init@4'
>
> It appears that Dev-C++ is not able to link with libmysql.lib. This
> libmysql.lib file is from the mysql++ VC++ version package.
>
> Also, I've used dlltool.exe to create libmysql.lib from libmysql.dll but
the
> linker error is still the same.
>
> What am I missing here?
> What options do I have?
> Perhaps load the libmysql.dll via LoadLibrary function?
>
> Tested my program using BCC5.5 and it compiles, links (with the lib for
> BCC5.5) and runs okay.
>
> Would appreciate any help. Thanks in advance.
>
> Yeoh
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|