Error al compilar con HMG3.6

HMG en Español

Moderator: Rathinagiri

jorge.posadas
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:

Error al compilar con HMG3.6

Post 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()
Attachments
Prueba.zip
(3.25 KiB) Downloaded 68 times
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
User avatar
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

Post by serge_girard »

Compiled with 3.4.4 : No problems!
There's nothing you can do that can't be done...
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Error al compilar con HMG3.6

Post 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
User avatar
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

Post by serge_girard »

Thanks Edk !
There's nothing you can do that can't be done...
User avatar
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

Post 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
There's nothing you can do that can't be done...
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Error al compilar con HMG3.6

Post 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.
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Error al compilar con HMG3.6

Post 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 :?:
jorge.posadas
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

Post 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-
Attachments
Error_Compilar_build_mysql_bat.png
Error_Compilar_build_mysql_bat.png (60.01 KiB) Viewed 1821 times
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
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Error al compilar con HMG3.6

Post 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
User avatar
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

Post by serge_girard »

Thanks for mentioning that space CHAR!
Now compiled successfully....

Thanks again and now for testing applications!

Serge
There's nothing you can do that can't be done...
Post Reply