Page 1 of 4

Error al compilar con HMG3.6

Posted: Mon Nov 25, 2024 5:38 am
by jorge.posadas
Grupo

Estoy haciendo una prueba para conectarme a una base de datos MariaDB estoy compilando con la version 3.6 a 64 bits y no se que debo de hacer o que me hace falta. Anexo un zip con los archivos que uso.

De antemano gracias por la ayuda

Este es el error que me da al compilar
hbmk2: Linking... Prueba.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/MySql.o:MySql.c:(.data+0x70): undefined reference to `HB_FUN_TMYSQLSERVER'
collect2.exe: error: ld returned 1 exit status
hbmk2[Prueba]: Error: Running linker. 1
gcc.exe .hbmk/win/mingw64/Main.o .hbmk/win/mingw64/MySql.o .hbmk/win/mingw64/PS_Create_Maria_DB.o .hbmk/win/mingw64/_hbmkaut_Main.o C:/PosadasSoftware/MariaDB/AccesoMariaDB/PRG/_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 -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 -oPrueba.exe -LC:/hmg.3.6/harbour64/lib/win/mingw64 -L"C:/hmg.3.6/lib-64"

hbmk2: Error: Referenced, missing, but unknown function(s): TMYSQLSERVER()

Re: Error al compilar con HMG3.6

Posted: Mon Nov 25, 2024 8:48 am
by serge_girard
Compiled with 3.4.4 : No problems!

Re: Error al compilar con HMG3.6

Posted: Mon Nov 25, 2024 12:55 pm
by edk
HMG 3.6 lacks hbmysql. I've attached a tutorial on how to include it.
MySQL integration with HMG 3.6.pdf.7z
(475.26 KiB) Downloaded 80 times

Re: Error al compilar con HMG3.6

Posted: Mon Nov 25, 2024 1:18 pm
by serge_girard
Thanks Edk !

Re: Error al compilar con HMG3.6

Posted: Mon Nov 25, 2024 1:46 pm
by serge_girard
I got some error..:

P:\hmg.3.6\harbour64\contrib\hbmysql>hbmk2 hbmysql.hbp -ip:\hmg.3.6 \include
'hbmk2' is not recognized as an internal or external command,
operable program or batch file.

Where did I go wrong?
Serge

Re: Error al compilar con HMG3.6

Posted: Mon Nov 25, 2024 3:03 pm
by edk
Check if your search paths are set correctly:
SET PATH=%HMGPATH%\harbour64\bin;%HMGPATH%\mingw64\bin;%PATH%

ask for path: echo %path%
and check if there is a path to P:\hmg.3.6\harbour64\bin, in this folder there is/should be hbmk2.exe file.

Re: Error al compilar con HMG3.6

Posted: Mon Nov 25, 2024 3:30 pm
by edk
serge_girard wrote: Mon Nov 25, 2024 1:46 pm P:\hmg.3.6\harbour64\contrib\hbmysql>hbmk2 hbmysql.hbp -ip:\hmg.3.6 \include
Check if you don't have an extra space character after 3.6 in SET HMGPATH=P:\hmg.3.6 :?:

Re: Error al compilar con HMG3.6

Posted: Mon Nov 25, 2024 4:23 pm
by jorge.posadas
Sr. EDK

Le agradezco la ayuda con el documento que me envio, hice todo las instucciones, pero al compilar el BUILD_MYSQL.BAT me da este error (envio imagen)
Y ya no supe COMO resulverlo, he notado la ruta que aparece y esa ruta la tengo correcta, pero ingnoro por que me da error-

Re: Error al compilar con HMG3.6

Posted: Mon Nov 25, 2024 5:10 pm
by edk
Ok. I am attaching the batch file, because I see that mistakes are being made in its content.
BUILD_MYSQL.7z
(344 Bytes) Downloaded 76 times

Code: Select all

@echo off
SET backup=%path%
SET HB_WITH_MYSQL=C:\mysql64\include
SET HMGPATH=c:\hmg.3.6
SET PATH=%HMGPATH%\harbour64\bin;%HMGPATH%\mingw64\bin;%PATH%
hbmk2 hbmysql.hbp -i%hmgpath%\include
ROBOCOPY .\ %HMGPATH%\HARBOUR64\lib\win\mingw64\ *.a
set path=%backup%
set backup=
pause

Re: Error al compilar con HMG3.6

Posted: Mon Nov 25, 2024 6:04 pm
by serge_girard
Thanks for mentioning that space CHAR!
Now compiled successfully....

Thanks again and now for testing applications!

Serge