Page 1 of 1

Harbour env. linking error

Posted: Sun Feb 24, 2013 2:44 pm
by Rimantas
Hi,

Trying to compile one project with TMySql ... I'm getting errors :
hbmk2: Linking... engel.exe
D:/a/hrb/lib/win/mingw/libhbmysql.a(mysql.o):mysql.c:(.text+0x16): undefined reference to `mysql_close@4'
D:/a/hrb/lib/win/mingw/libhbmysql.a(mysql.o):mysql.c:(.text+0x46): undefined reference to `mysql_free_result@4'
D:/a/hrb/lib/win/mingw/libhbmysql.a(mysql.o):mysql.c:(.text+0x109c): undefined reference to `mysql_real_escape_string@16'
...
D:/a/hrb/lib/win/mingw/libhbmysql.a(mysql.o):mysql.c:(.text+0x1145): undefined reference to `mysql_escape_string@12'
D:/a/hrb/lib/win/mingw/libhbmysql.a(mysql.o):mysql.c:(.text+0x121d): undefined reference to `mysql_escape_string@12'

What I must to add to project ?

With best regards and many thanks in advance ! Rimantas

FWH 11.12 , Harbour 3.0 , MinGw

Re: Harbour env. linking error

Posted: Sun Feb 24, 2013 8:53 pm
by Antonio Linares

Re: Harbour env. linking error

Posted: Mon Feb 25, 2013 4:29 pm
by Rimantas
Antonio Linares wrote:Rimantas,
Link this library too:
http://www.sitasoft.net/dolphin/files/libmysql_lib.zip
Many thanks Antonio . Another question ( stupid ... :-) ) - I don't know how to direct this lib for mingw binaries . Now I'm seeing in \hrb\lib\win\mingw libs as "lib*.a" files . Here it's .lib file . So I'll be thankfull for that help ... :-)

Re: Harbour env. linking error

Posted: Mon Feb 25, 2013 5:58 pm
by Antonio Linares
Rimantas,

You can also download the mingw version from Sitasoft's site :-)

Re: Harbour env. linking error

Posted: Mon Feb 25, 2013 6:40 pm
by Rimantas
Antonio Linares wrote:Rimantas,

You can also download the mingw version from Sitasoft's site :-)
Google my friend ... but not helped with keywords "mingw sitasoft" ... :( . Where it can be found ?

Also I found that : http://forums.mysql.com/read.php?167,295483,297733 .
But the "2." step unsucesfull . libmysql.a 0 byte sized ...

Re: Harbour env. linking error

Posted: Wed Feb 27, 2013 6:48 am
by Rimantas
Hi,

I'm asking to help to me build libmysql ( .a or .lib ) library for Harbour 3.0 MinGw . I found that : http://forums.mysql.com/read.php?167,295483,297733 .

1. pexports libmysql.dll > libmysql.def

Exported def . Success

2. dlltool -k --input-def libmysql.def --dllname libmysql.dll --output-lib libmysql.a

Not success ... libmysql 0 length ... :(

Please help ...

Re: Harbour env. linking error

Posted: Wed Feb 27, 2013 7:46 am
by Antonio Linares

Re: Harbour env. linking error

Posted: Wed Feb 27, 2013 3:58 pm
by nnicanor

Re: Harbour env. linking error

Posted: Wed Feb 27, 2013 5:35 pm
by Rimantas
nnicanor wrote:Rimantas,


http://190.90.160.205/pruebas/libmysql_mingw.zip

Regards,
Many thanks ! :)

Sorry Antonio , with your file - "Unrecognized file format" or something similar ... :)

With best regards ! Rimantas