hbmysql.lib

341 views
Skip to first unread message

Quique

unread,
Oct 13, 2011, 2:35:07 PM10/13/11
to Harbour Users
I want test acces mysql with tmysql but

1. This lib doesn't was created, harbour\lib\win\bcc\.hbmk\hbmysql\ is
empty, is it a bug?

2. then I tryied to create the library but show a warning and doesn't
create it:

c:\Quique\lenguaje\harbour\contrib\hbmysql>hbmk2 hbmysql
hbmk2: Warning: Missing dependency: mysql

c:\Quique\lenguaje\harbour\contrib\hbmysql>hbmk2 hbmysql -trace
hbmk2: Warning: Missing dependency: mysql

c:\Quique\lenguaje\harbour\contrib\hbmysql>

Klas Engwall

unread,
Oct 13, 2011, 2:54:13 PM10/13/11
to harbou...@googlegroups.com
Hi Quique,

Did you set the environment variable ...

HB_WITH_MYSQL=C:\mysql\include

... or whatever the path to the include files of the MYSQL package is in
you system?

Regards,
Klas

Quique

unread,
Oct 17, 2011, 2:02:46 PM10/17/11
to Harbour Users
Thanks, I already did it and compiled hbmysql.lib, but at time to
compile the program I obtain.

Error: Unresolved external 'mysql_init' referenced from K:\LENGUAJE
\HARBOUR\LIB\
WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_real_connect' referenced from K:
\LENGUAJE\HARB
OUR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_close' referenced from K:\LENGUAJE
\HARBOUR\LIB
\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_get_server_version' referenced from
K:\LENGUAJ
E\HARBOUR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_commit' referenced from K:\LENGUAJE
\HARBOUR\LI
B\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_rollback' referenced from K:\LENGUAJE
\HARBOUR\
LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_select_db' referenced from K:
\LENGUAJE\HARBOUR
\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_query' referenced from K:\LENGUAJE
\HARBOUR\LIB
\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_store_result' referenced from K:
\LENGUAJE\HARB
OUR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_use_result' referenced from K:
\LENGUAJE\HARBOU
R\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_fetch_lengths' referenced from K:
\LENGUAJE\HAR
BOUR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_data_seek' referenced from K:
\LENGUAJE\HARBOUR
\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_fetch_field' referenced from K:
\LENGUAJE\HARBO
UR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_field_seek' referenced from K:
\LENGUAJE\HARBOU
R\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_num_fields' referenced from K:
\LENGUAJE\HARBOU
R\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_field_count' referenced from K:
\LENGUAJE\HARBO
UR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_list_fields' referenced from K:
\LENGUAJE\HARBO
UR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_errno' referenced from K:\LENGUAJE
\HARBOUR\LIB
\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_error' referenced from K:\LENGUAJE
\HARBOUR\LIB
\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_list_dbs' referenced from K:\LENGUAJE
\HARBOUR\
LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_list_tables' referenced from K:
\LENGUAJE\HARBO
UR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_num_rows' referenced from K:\LENGUAJE
\HARBOUR\
LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_fetch_row' referenced from K:
\LENGUAJE\HARBOUR
\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_free_result' referenced from K:
\LENGUAJE\HARBO
UR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_affected_rows' referenced from K:
\LENGUAJE\HAR
BOUR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_get_host_info' referenced from K:
\LENGUAJE\HAR
BOUR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_get_server_info' referenced from K:
\LENGUAJE\H
ARBOUR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_insert_id' referenced from K:
\LENGUAJE\HARBOUR
\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_ping' referenced from K:\LENGUAJE
\HARBOUR\LIB\
WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_real_escape_string' referenced from
K:\LENGUAJ
E\HARBOUR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
Error: Unresolved external 'mysql_escape_string' referenced from K:
\LENGUAJE\HAR
BOUR\LIB\WIN\BCC\HBMYSQL.LIB|mysql
hbmk2: Error: Running linker. 2
ilink32.exe @C:\Users\Audberto\AppData\Local\Temp\1tmdtt.lnk

C:\Quique\oegsa\oegsa\hbmk2>

I tryed looking for the first function "mysql_init" but I didn't found
it in harbour, then I tryed useing libmysql.lib from mysql
instalation, I understood it because hbmysql.hbc says:

{unix}libs=mysqlclient
{darwin}libpaths=/opt/local/lib/mysql5/mysql
{win|dos}libs=libmysql
{os2}libs=mysqlclient


I found three libmysql.lib in mysql instalation:

c:\Archivos de programa\MySQL\Connector C 6.0.2\lib\debug\libmysql.lib
c:\Archivos de programa\MySQL\Connector C 6.0.2\lib\opt\libmysql.lib
c:\Archivos de programa\MySQL\MySQL Server 5.5\lib\libmysql.lib

but with the three files I has troubles (I copied each one to other
directory to try with them):

Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: 'K:\LENGUAJE\MYSQL\LIB\LIBMYSQL.LIB' contains invalid OMF
record, type 0x
21 (possibly COFF)
hbmk2: Error: Running linker. 2
ilink32.exe @C:\Users\Audberto\AppData\Local\Temp\quml1j.lnk

C:\Quique\oegsa\oegsa\hbmk2>

What I need to can compile with hbmysql.lib?

Klas Engwall

unread,
Oct 17, 2011, 6:25:00 PM10/17/11
to harbou...@googlegroups.com
Hi Quique,

> Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
> Error: 'K:\LENGUAJE\MYSQL\LIB\LIBMYSQL.LIB' contains invalid OMF
> record, type 0x
> 21 (possibly COFF)
> hbmk2: Error: Running linker. 2
> ilink32.exe @C:\Users\Audberto\AppData\Local\Temp\quml1j.lnk
>

> What I need to can compile with hbmysql.lib?

The Borland linker needs lib files in OMF format, and the lib files you
used seem to be in COFF format (which practically every other linker
uses). So go back to the MYSQL site and look for a download in OMF format.

Regards,
Klas

Quique

unread,
Oct 18, 2011, 3:35:18 PM10/18/11
to Harbour Users
thanks you
Reply all
Reply to author
Forward
0 new messages