Error al compilar con HMG3.6
Moderator: Rathinagiri
-
- Posts: 183
- Joined: Mon May 19, 2014 7:43 pm
- DBs Used: DBF, SQLite, MS-SQL, ACCESS, MariaDB (en proceso)
- Location: Morelia, Mich. México
- Contact:
Re: Error al compilar con HMG3.6
EDK
Muchas gracias ya recompile bien tidi y ya no me da error.
Solo que ahora no me puedo conectar al servidor ni tampoco crear la base de datos ni tablas, tendré que ver como le hago,
Muchas gracias ya recompile bien tidi y ya no me da error.
Solo que ahora no me puedo conectar al servidor ni tampoco crear la base de datos ni tablas, tendré que ver como le hago,
Cordialmente
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: posoft@gmx.com
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: posoft@gmx.com
Re: Error al compilar con HMG3.6
¿Qué versión del servidor MySQL tienes?
- serge_girard
- Posts: 3309
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Error al compilar con HMG3.6
Edward,
First compilation give this error:
I have this in my HBC-file:
I suppose C:\hmg.3.6\hmg64.hbc (P:\hmg.3.6\hmg64.hbc in my case) need some adjustments?
Serge
First compilation give this error:
Code: Select all
P:/hmg.3.6/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lssl: No such file or directory
P:/hmg.3.6/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcrypto: No such file or directory
I have this in my HBC-file:
Code: Select all
libs=hbssl
libs=libeay32
libs=ssleay32
I suppose C:\hmg.3.6\hmg64.hbc (P:\hmg.3.6\hmg64.hbc in my case) need some adjustments?
Serge
There's nothing you can do that can't be done...
- serge_girard
- Posts: 3309
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Error al compilar con HMG3.6
Edward, How about UNICODE? It got my program compiled (SSL stuff in REMARK) and now it works but my SQL results with french accents (ç .. ë è ..) are unreadable....
Serge
Serge
There's nothing you can do that can't be done...
-
- Posts: 183
- Joined: Mon May 19, 2014 7:43 pm
- DBs Used: DBF, SQLite, MS-SQL, ACCESS, MariaDB (en proceso)
- Location: Morelia, Mich. México
- Contact:
Re: Error al compilar con HMG3.6
EDK
Realmente uso MARIADB 11.5
Realmente uso MARIADB 11.5
Cordialmente
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: posoft@gmx.com
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: posoft@gmx.com
- serge_girard
- Posts: 3309
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Error al compilar con HMG3.6
Jorge,
I think this will not be a problem!
Serge
I think this will not be a problem!
Serge
There's nothing you can do that can't be done...
Re: Error al compilar con HMG3.6
For the MariaDB server, you need to build hbmysql in a slightly different way.
Specify the location of the MariaDB SQL server installation instead of MySQL and use the libmariadb.dll library by renaming it to libmysql.dll
Here is configuration for MariaDB 11.5:
Code: Select all
SET HB_WITH_MYSQL=c:\Program Files\MariaDB 11.5\include\mysql
Re: Error al compilar con HMG3.6
Hi Serge.serge_girard wrote: ↑Tue Nov 26, 2024 10:33 am Edward,
First compilation give this error:Code: Select all
P:/hmg.3.6/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lssl: No such file or directory P:/hmg.3.6/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcrypto: No such file or directory
I have this in my HBC-file:Code: Select all
libs=hbssl libs=libeay32 libs=ssleay32
I suppose C:\hmg.3.6\hmg64.hbc (P:\hmg.3.6\hmg64.hbc in my case) need some adjustments?
Serge
There are no SSL libraries, so we have to build them. We proceed in a similar way as with hbmysql.
Preparing OpenSSL v.3:
Download the Win64 OpenSSL v3.4.0 EXE installer ( 64-bit! ) from the website https://slproweb.com/products/Win32OpenSSL.html
Run the downloaded installer and install OpenSSL to the C:\OpenSSL-Win64-3.4.0 folder, when asked where to copy the OpenSSL DLLS indicate "The OpenSSL binaries (/bin) directory"
Building the hbssl library:
As with the missing hbmysql, we need to have the harbour sources. The hbssl sources are located in the core-master\contrib\hbssl\ folder. Copy the hbssl folder to c:\hmg.3.6\harbour64\contrib\ (in your case it would be P:\hmg.3.6\harbour64\contrib\ )
In the copied folder, create a batch file build_hbssl.bat
Code: Select all
@echo off
SET backup=%path%
SET HB_WITH_OPENSSL=C:\OpenSSL-Win64-3.4.0\include
SET HMGPATH=c:\hmg.3.6
SET PATH=%HMGPATH%\harbour64\bin;%HMGPATH%\mingw64\bin;%PATH%
hbmk2 hbssl.hbp -i%hmgpath%\include
ROBOCOPY .\ %HMGPATH%\HARBOUR64\lib\win\mingw64\ *.a
set path=%backup%
set backup=
pause
* in the HB_WITH_OPENSSL variable we define the path where OpenSSL 3 is installed
Modification of hbssl.hbc for OpenSSL 3 library:
In OpenSSL 3 the names of the library files have changed, so you need to edit the file c:\hmg.3.6\harbour64\contrib\hbssl.hbc to the following notations:
Code: Select all
description=OpenSSL wrapper (encryption)
# NOTE: use HB_STATIC_OPENSSL=yes envvar to link openssl lib statically
incpaths=.
headers=${hb_name}.ch
skip={dos}
{!HB_DYNBIND_OPENSSL&!(HB_STATIC_OPENSSL&!hbdyn)}libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF}
{!HB_DYNBIND_OPENSSL& (HB_STATIC_OPENSSL&!hbdyn)}libs=${_HB_DYNPREF}${hb_name}s${_HB_DYNSUFF}
{!HB_DYNBIND_OPENSSL&unix}libs=ssl crypto
{!HB_DYNBIND_OPENSSL&os2}libs=libssl_s libcrypto_s
{!HB_DYNBIND_OPENSSL&!(HB_STATIC_OPENSSL&!hbdyn)&win&!allmingw}libs=ssleay32 libeay32
{!HB_DYNBIND_OPENSSL& (HB_STATIC_OPENSSL&!hbdyn)&win&!allmingw}libs=ssleay32 libeay32
#{!HB_DYNBIND_OPENSSL&!(HB_STATIC_OPENSSL&!hbdyn)&allmingw}libs=ssl crypto
#{!HB_DYNBIND_OPENSSL& (HB_STATIC_OPENSSL&!hbdyn)&allmingw}libs=ssl crypto
{!HB_DYNBIND_OPENSSL&!(HB_STATIC_OPENSSL&!hbdyn)&allmingw}libs=libssl-3-x64 libcrypto-3-x64
{!HB_DYNBIND_OPENSSL& (HB_STATIC_OPENSSL&!hbdyn)&allmingw}libs=libssl-3-x64 libcrypto-3-x64
{!HB_DYNBIND_OPENSSL& (HB_STATIC_OPENSSL&!hbdyn)&allwin}libs=crypt32
That's all.
In this version of hbssl with OpenSSL 3, no external .dll libraries are required, because they are imported into the liblibcrypto-3-x64.a and liblibssl-3-x64.a libraries, so they will be included in the application executable

If you compile using an IDE, put the following in the configuration:
Code: Select all
libs=hbssl
libs=libssl-3-x64
libs=libcrypto-3-x64
Code: Select all
hbcs=hbssl.hbc
If you compile using a build64.bat, add the following to .hbp file in your project:
Code: Select all
hbssl.hbc
- Attachments
-
- hbssl_v3.4.zip
- (806 Bytes) Downloaded 88 times
- serge_girard
- Posts: 3309
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Error al compilar con HMG3.6
Thanks, this SSL-thing will be something for tomorrow...
Serge
Serge
There's nothing you can do that can't be done...
- mjaviergutierrez
- Posts: 156
- Joined: Fri Nov 30, 2012 7:51 pm
- DBs Used: DBF
- Location: San Lorenzo, Santa Fe, Argentina
Re: Error al compilar con HMG3.6
Hola Colegas ! Estoy tratando de compilar en 64 bits, usando libmysql.dll, hice todos los paso del PDF para la integracion de MySQL con HMG 3.6., pero al compilar desde el IDE me sale este error :
hbmk2[Motel]: Warning: Cannot find hbmysql=hbmysql.hbc (referenced from
C:\hmg.3.6\hmg64.hbc)
hbmk2: Linking... Motel.exe
C:/hmg.3.6/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .hbmk/win/mingw64/Main.o:Main.c:(.data+0xa30): undefined reference to `HB_FUN_TMYSQLSERVER'
collect2.exe: error: ld returned 1 exit status
hbmk2[Motel]: Error: Running linker. 1
gcc.exe .hbmk/win/mingw64/Main.o .hbmk/win/mingw64/Administracion.o .hbmk/win/mingw64/Caja.o .hbmk/win/mingw64/Configuracion.o .hbmk/win/mingw64/Inicio.o .hbmk/win/mingw64/Mucamas.o .hbmk/win/mingw64/Recepcion.o .hbmk/win/mingw64/Shared.o .hbmk/win/mingw64/_hbmkaut_Main.o C:/Work/temp/_temp.o -pthread -static-libgcc -static-libstdc++ -static -lpthread -mwindows -Wl,--start-group -l"hmg-64" -l"crypt-64" -l"edit-64" -l"editex-64" -l"graph-64" -l"ini-64" -l"report-64" -l"hfcl-64" -lmsvfw32 -lvfw32 -l"hbvpdf-64" -lhbct -lhbwin -lhbmzip -lminizip -lhbmemio -lhbmisc -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lhbodbc -lodbc32 -lhbhpdf -lhbnetio -lxhb -lpng -llibhpdf -lhbzebra -lsoftail -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lwinmm -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -oMotel.exe -LC:/hmg.3.6/harbour64/lib/win/mingw64 -L"C:/hmg.3.6/lib-64"
hbmk2: Hint: Add option 'hbmysql.hbc' for missing function(s): TMySQLServer()
le di varias vueltas, pero no consigo entender ......... Ayuda !
Saludos.
hbmk2[Motel]: Warning: Cannot find hbmysql=hbmysql.hbc (referenced from
C:\hmg.3.6\hmg64.hbc)
hbmk2: Linking... Motel.exe
C:/hmg.3.6/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .hbmk/win/mingw64/Main.o:Main.c:(.data+0xa30): undefined reference to `HB_FUN_TMYSQLSERVER'
collect2.exe: error: ld returned 1 exit status
hbmk2[Motel]: Error: Running linker. 1
gcc.exe .hbmk/win/mingw64/Main.o .hbmk/win/mingw64/Administracion.o .hbmk/win/mingw64/Caja.o .hbmk/win/mingw64/Configuracion.o .hbmk/win/mingw64/Inicio.o .hbmk/win/mingw64/Mucamas.o .hbmk/win/mingw64/Recepcion.o .hbmk/win/mingw64/Shared.o .hbmk/win/mingw64/_hbmkaut_Main.o C:/Work/temp/_temp.o -pthread -static-libgcc -static-libstdc++ -static -lpthread -mwindows -Wl,--start-group -l"hmg-64" -l"crypt-64" -l"edit-64" -l"editex-64" -l"graph-64" -l"ini-64" -l"report-64" -l"hfcl-64" -lmsvfw32 -lvfw32 -l"hbvpdf-64" -lhbct -lhbwin -lhbmzip -lminizip -lhbmemio -lhbmisc -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lhbodbc -lodbc32 -lhbhpdf -lhbnetio -lxhb -lpng -llibhpdf -lhbzebra -lsoftail -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lwinmm -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -oMotel.exe -LC:/hmg.3.6/harbour64/lib/win/mingw64 -L"C:/hmg.3.6/lib-64"
hbmk2: Hint: Add option 'hbmysql.hbc' for missing function(s): TMySQLServer()
le di varias vueltas, pero no consigo entender ......... Ayuda !
Saludos.
...