Discussion:
[Dev-C++] Writing a mySQL client
Yeoh HS
2001-04-13 07:22:08 UTC
Permalink
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
`***@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
Devin Smith
2001-04-13 17:40:37 UTC
Permalink
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" <***@yahoo.com>
To: <dev-cpp-***@lists.sourceforge.net>
Sent: Friday, April 13, 2001 12:22 AM
Subject: [Dev-C++] Writing a mySQL client
Post by Yeoh HS
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.
d:\devcpp\login.o(.text+0x5c):login.cpp: undefined reference to
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!?
_______________________________________________
Dev-cpp-users mailing list
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
Yeoh HS
2001-04-14 03:59:00 UTC
Permalink
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 <***@buyabs.com>
To: <dev-cpp-***@lists.sourceforge.net>
Sent: Saturday, April 14, 2001 1:40 AM
Subject: Re: [Dev-C++] Writing a mySQL client
Post by Devin Smith
I am getting the same problem trying to compile a sample little test
program.
#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 -----
Sent: Friday, April 13, 2001 12:22 AM
Subject: [Dev-C++] Writing a mySQL client
Post by Yeoh HS
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
Post by Yeoh HS
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.
d:\devcpp\login.o(.text+0x5c):login.cpp: undefined reference to
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
Post by Yeoh HS
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!?
_______________________________________________
Dev-cpp-users mailing list
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_______________________________________________
Dev-cpp-users mailing list
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
John
2001-04-14 20:34:31 UTC
Permalink
Hi,

"reimp.exe" is a nice utility, could you post link for download.

Thanks,

Jasbir Chauhan
Post by Yeoh HS
Hi Devin,
I finally got it to work! :)
Created liblibmysql.a using a tool called "reimp.exe".
`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 -----
Sent: Saturday, April 14, 2001 1:40 AM
Subject: Re: [Dev-C++] Writing a mySQL client
Post by Devin Smith
I am getting the same problem trying to compile a sample little test
program.
#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 -----
Sent: Friday, April 13, 2001 12:22 AM
Subject: [Dev-C++] Writing a mySQL client
Post by Yeoh HS
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
Post by Yeoh HS
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.
d:\devcpp\login.o(.text+0x5c):login.cpp: undefined reference to
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
Post by Yeoh HS
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!?
_______________________________________________
Dev-cpp-users mailing list
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_______________________________________________
Dev-cpp-users mailing list
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________
Do You Yahoo!?
_______________________________________________
Dev-cpp-users mailing list
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
Purohit Prahlad J..
2001-04-15 04:40:36 UTC
Permalink
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.
Yeoh HS
2001-04-16 00:03:27 UTC
Permalink
Hi,
Here's the info from the readme file.

* Contact information
URL: http://www.acc.umu.se/~anorland/gnu-win32/
Anders Norlander <***@hem2.passagen.se>

Yeoh
----- Original Message -----
From: John <***@icenter.net>
To: <dev-cpp-***@lists.sourceforge.net>
Sent: Sunday, April 15, 2001 4:34 AM
Subject: Re: [Dev-C++] Writing a mySQL client
Post by John
Hi,
"reimp.exe" is a nice utility, could you post link for download.
Thanks,
Jasbir Chauhan
Post by Yeoh HS
Hi Devin,
I finally got it to work! :)
Created liblibmysql.a using a tool called "reimp.exe".
`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 -----
Sent: Saturday, April 14, 2001 1:40 AM
Subject: Re: [Dev-C++] Writing a mySQL client
Post by Devin Smith
I am getting the same problem trying to compile a sample little test
program.
#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 -----
Sent: Friday, April 13, 2001 12:22 AM
Subject: [Dev-C++] Writing a mySQL client
Post by Yeoh HS
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
Post by Yeoh HS
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.
d:\devcpp\login.o(.text+0x5c):login.cpp: undefined reference to
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
Post by Yeoh HS
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!?
_______________________________________________
Dev-cpp-users mailing list
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_______________________________________________
Dev-cpp-users mailing list
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________
Do You Yahoo!?
_______________________________________________
Dev-cpp-users mailing list
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_______________________________________________
Dev-cpp-users mailing list
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Jose Manuel Padron Carrillo
2001-04-17 07:11:14 UTC
Permalink
As far as I know the Fifth Edition is the newest book.

Chemanuel

--- "Purohit Prahlad J.." <***@sify.com> escribió: > Hello
Friends,
Post by Purohit Prahlad J..
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

Continue reading on narkive:
Loading...