Re: [Dev-C++] Writing a mySQL client
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Yeoh H. <ye...@ya...> - 2001-04-14 03:56:28
|
Hi Devin,
I finally got it to work! :)
Created liblibmysql.a using a tool called "reimp.exe".
According to the readme file:
`reimp' is a tool to convert Microsoft's new-style (short) import
libraries to import libraries for win32 ports of GNU tools (mingw32,
cygwin).
The command: "reimp.exe libmysql.lib" will create liblibmysql.a
Then all I had to do was to add this file liblibmysql.a to the linker
options and re-build my exe.
If you need the tool "reimp.exe", do e-mail me. I have downloaded the exe +
src and the zip file is only 31K.
Note that the libmysql.lib file is Microsoft's format.
Regards,
Yeoh
----- Original Message -----
From: Devin Smith <dev...@bu...>
To: <dev...@li...>
Sent: Saturday, April 14, 2001 1:40 AM
Subject: Re: [Dev-C++] Writing a mySQL client
> 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
> >
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
|