Building mysql in harbour 3.2

397 views
Skip to first unread message

M.FACCIO adinet

unread,
Jun 11, 2015, 9:14:52 AM6/11/15
to harbou...@googlegroups.com
After trying I cannot find the correct way to build mysql in harbour 3.2.
I do not understand if the mysql connector is not the correct one, or
how i have to build the library

Here the errrors


I am building on WinXP

C:\Harb3>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=C:/mingw32/bin/../libexec/gcc/i686-w64-mingw32/4.9.2/lto-wrapper.exe
Target: i686-w64-mingw32


C:\Harb3\core\contrib>hbmk2 make.hb hbmysql clean install
! Package rebuild and install... 1 project(s)
c:\hb32\bin\hbmk2 -quiet -width=0 -autohbm- @../hbpre -inc -rebuildall
../hbmysql/hbmysql.hbp @../hbpost
hbmk2: Biblioteca de importación creada:
..\..\lib\win\mingw\liblibmySQL.a <= C:\MYSQL5.5\lib\libmySQL.dll


Mysql5.5
MySQL Connector/C 6.1

All build fine but when I compile with this harbour


hbmk2: Harbour: Compilando módulos...
Harbour 3.2.0dev (r1506040736)
Copyright (c) 1999-2015, http://harbour-project.org/
...
...
C:/Hb32/lib/win/mingw/liblibmysql.a: error adding symbols: File in wrong
format
collect2.exe: error: ld returned 1 exit status
hbmk2[xxxxxxx]: Error: Ejecutando enlazador. 1

Thank you in advance



Maurizio



Lautaro Moreira

unread,
Jun 11, 2015, 9:39:59 AM6/11/15
to harbou...@googlegroups.com
Hello,

You using 64bits mysql lib for a 32bits aplication.

You must be use mysql 32 bit lib.

( Sorry for may bad english )


Regards,

Lautaro
--
Lautaro Moreira
Departamento de Informática
Consultora Audytax Limitada
Cel : 63345400




Avast logo

El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
www.avast.com


M.FACCIO adinet

unread,
Jun 12, 2015, 8:37:43 AM6/12/15
to harbou...@googlegroups.com


El 12/06/2015 a las 09:32 a.m., Maurizio Faccio escribió:
> [Eng]
> I've downloaded
>
> http://cdn.mysql.com/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip
> http://cdn.mysql.com/Downloads/Connector-C/mysql-connector-c-6.1.6-win32.zip
>
> And no one works
>
> Can you point me to the correct link
>
> I continue with you in spanish and i will post how I resolve to the list.
>
> Maurizio
>

Lautaro Moreira

unread,
Jun 12, 2015, 8:50:31 AM6/12/15
to harbou...@googlegroups.com
Hello,

Two files are right , only version is diferent.

Regards,

Lautaro

elch

unread,
Jun 12, 2015, 11:42:37 AM6/12/15
to harbou...@googlegroups.com
Hi Maurizio,

 
I am building on WinXP
== 32 bit


C:\Harb3>gcc -v
..
COLLECT_LTO_WRAPPER=C:/mingw32/bin/../libexec/gcc/i686-w64-mingw32/4.9.2/lto-wrapper.exe
Target: i686-w64-mingw32

looks to me you are using a 64bit capable MinGW.

AFAIK i know, this can also build 32 bit applications -- but i have not done so far, so i don't know options for that.


 
C:\Harb3\core\contrib>hbmk2 make.hb hbmysql clean install
! Package rebuild and install... 1 project(s)
c:\hb32\bin\hbmk2 -quiet -width=0 -autohbm- @../hbpre -inc -rebuildall
../hbmysql/hbmysql.hbp @../hbpost
hbmk2: Biblioteca de importación creada:
..\..\lib\win\mingw\liblibmySQL.a <= C:\MYSQL5.5\lib\libmySQL.dll

When the hbmysql contrib is build, Harbour searches in a directory given with the environment variable:

set HB_WITH_MYSQL=C:\MySQL6.1\lib

where "path" points to the *lib* directory of the connector *development* kit.

Here the wrong directory [ Mysql5.5 ] seem used.


And the result "liblibmySQL.a" must be 32bit.

I am not sure, if hbmk2 sets needed options if a contrib is build solely.

You may try a complete rebuild of Harbour, with HB_WITH_MYSQL environment variable set before.


Is this a fresh Harbour install and the rest works, so a test program without MySQL works ?


regards

Rolf

M.FACCIO adinet

unread,
Jun 12, 2015, 4:40:13 PM6/12/15
to harbou...@googlegroups.com
Thank you Elch and Lautaro

The solution was download nightly build, and use  mingw located in that 7z.
The trouble is with the mingw i am using.
Works fine

Thank you for you time

Maurizo
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages