Thread: [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-13 07:18:55
|
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 |
|
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
>
|
|
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
|
|
From: John <10...@ic...> - 2001-04-14 20:35:31
|
Hi,
"reimp.exe" is a nice utility, could you post link for download.
Thanks,
Jasbir Chauhan
Yeoh HS wrote:
> 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
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Purohit P. J.. <pra...@si...> - 2001-04-15 04:41:06
|
Hello Friends,
I am Prahlad Purohit, I have been using Programming Windows By =
Charles Petzold Fifth Edition. I searched Microsoft Website And =
CharlesPetzold.com for newer version of this book but there is n't any =
version later than fifth. The Fifth Edition Was For Windows 98 Does Any =
One Know Any Simillar Book Which Is For Windows 2000, Windows me, the =
new WIN64 Programming.
=20
regards,
Prahlad Purohit.
|
|
From: <jos...@ya...> - 2001-04-17 07:11:17
|
As far as I know the Fifth Edition is the newest book. Chemanuel --- "Purohit Prahlad J.." <pra...@si...> escribió: > Hello Friends, > > I am Prahlad Purohit, I have been using Programming Windows By > Charles Petzold Fifth Edition. I searched Microsoft Website And > CharlesPetzold.com for newer version of this book but there is n't > any version later than fifth. The Fifth Edition Was For Windows 98 > Does Any One Know Any Simillar Book Which Is For Windows 2000, > Windows me, the new WIN64 Programming. > > regards, > Prahlad Purohit. > _______________________________________________________________ Do You Yahoo!? Envía mensajes instantáneos y recibe alertas de correo con Yahoo! Messenger - http://messenger.yahoo.es |
|
From: Yeoh H. <ye...@ya...> - 2001-04-16 00:26:07
|
Hi, Here's the info from the readme file. * Contact information URL: http://www.acc.umu.se/~anorland/gnu-win32/ Anders Norlander <ano...@he...> Yeoh ----- Original Message ----- From: John <10...@ic...> To: <dev...@li...> Sent: Sunday, April 15, 2001 4:34 AM Subject: Re: [Dev-C++] Writing a mySQL client > Hi, > > "reimp.exe" is a nice utility, could you post link for download. > > Thanks, > > Jasbir Chauhan > > Yeoh HS wrote: > > > 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 > > > > _______________________________________________ > > 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 |