estou tentando compilar o mysql.c e me falta a definição HB_SIZE conforme imagem abaixo.
Utilizo: Xharbour 1.2.1 (Simplex) Rev.6406
Borland 5.5 32 Bits
undefined symbol 'HB_SIZE'
falta algum "include" ?
Code: Select all
#pragma BEGINDUMP
#include "hbapi.h"
#include "hbapierr.h"
#include "hbapiitm.h"
#include "hbapifs.h"
#include "winsock2.h"
#include "mysql.h"
/* GC object handlers */
static HB_GARBAGE_FUNC( MYSQL_release )
{
void ** ph = ( void ** ) Cargo;
/* Check if pointer is not NULL to avoid multiple freeing */
if( ph && * ph )
{
/* Destroy the object */
mysql_close( ( MYSQL * ) * ph );
/* set pointer to NULL to avoid multiple freeing */
* ph = NULL;
}
}
static void hb_MYSQL_ret( MYSQL * p )
{
if( p )
{
void ** ph = ( void ** ) hb_gcAlloc( sizeof( MYSQL * ), MYSQL_release );
* ph = p;
hb_retptrGC( ph );
}
else
hb_retptr( NULL );
}
static MYSQL * hb_MYSQL_par( int iParam )
{
void ** ph = ( void ** ) hb_parptrGC( MYSQL_release, iParam );
return ph ? ( MYSQL * ) * ph : NULL;
}
static HB_GARBAGE_FUNC( MYSQL_RES_release )
{
void ** ph = ( void ** ) Cargo;
/* Check if pointer is not NULL to avoid multiple freeing */
if( ph && * ph )
{
/* Destroy the object */
mysql_free_result( ( MYSQL_RES * ) * ph );
/* set pointer to NULL to avoid multiple freeing */
* ph = NULL;
}
}
static void hb_MYSQL_RES_ret( MYSQL_RES * p )
{
if( p )
{
void ** ph = ( void ** ) hb_gcAlloc( sizeof( MYSQL_RES * ), MYSQL_RES_release );
* ph = p;
hb_retptrGC( ph );
}
else
hb_retptr( NULL );
}
static MYSQL_RES * hb_MYSQL_RES_par( int iParam )
{
void ** ph = ( void ** ) hb_parptrGC( MYSQL_RES_release, iParam );
return ph ? ( MYSQL_RES * ) * ph : NULL;
}
HB_FUNC( MYSQL_LIST_DBS ) /* MYSQL_RES * mysql_list_dbs( MYSQL *, char * wild ); */
{
MYSQL * mysql = hb_MYSQL_par( 1 );
if( mysql )
{
MYSQL_RES * mresult = mysql_list_dbs( mysql, NULL );
HB_SIZE nr = ( HB_SIZE ) mysql_num_rows( mresult );
PHB_ITEM aDBs = hb_itemArrayNew( nr );
HB_SIZE i;
for( i = 0; i < nr; ++i )
{
MYSQL_ROW mrow = mysql_fetch_row( mresult );
hb_arraySetC( aDBs, i + 1, mrow[ 0 ] );
}
mysql_free_result( mresult );
hb_itemReturnRelease( aDBs );
}
else
hb_errRT_BASE( EG_ARG, 2020, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
#pragma ENDDUMP