Page 1 of 7
Migration from HMG to HMG Minigui
Posted: Mon Mar 28, 2022 9:39 am
by serge_girard
Hello,
I want to migrate a rather complex application fro HMG to HMG Minigui. I copied all PRG etc. and made a compile.bat file.
Now having changed all the necessary I have some link errors:
Code: Select all
C:\minigui\newproj>call ..\batch\compile.bat newproj /l hbsqlit3 /l sqlite3 /lg winreport /l hbzebra
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Compiling 'newproj.prg'...
Lines 40386, Functions/Procedures 138
Generating C source output to 'newproj.c'... Done.
newproj.c:
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_TMYSQLSERVER' referenced from C:\MINIGUI\newproj\newproj.OBJ
Error: Unresolved external '_HB_FUN_READ_INI' referenced from C:\MINIGUI\newproj\newproj.OBJ
Error: Unresolved external '_HB_FUN_WK_PRES1' referenced from C:\MINIGUI\newproj\newproj.OBJ
Error: Unresolved external '_HB_FUN_WK_PERS1' referenced from C:\MINIGUI\newproj\newproj.OBJ
etc. etc. etc.
This is my compile.bat which I copied somewhere from demo or whatever.
Code: Select all
call ..\..\..\batch\compile.bat demo %1 /l hbsqlit3 /l sqlite3 /lg winreport /l hbzebra %2 %3 %4 %5 %6 %7 %8 %9
My project has about 25 PRG. How do I a make compile.bat? In HMG I have a HBP file with all PRG mentioned in it.
My knowledge of BAT has reduced to none....
Could some please lead me!
Thanks, Serge
Re: Migration from HMG to HMG Minigui
Posted: Mon Mar 28, 2022 10:49 am
by hansmarc
Hi Serge,
below examples for compile.bat, the *.hbp and *.hbc files that i used for a project called TERRAWB.
Replace 'terrawb' by your own project name.
I call, run 'compile.bat' from command.com or with Visual Studio with F5.
Regards
Hans
COMPILE.BAT
Code: Select all
@echo off
rem -
rem Output filename
set oname=TerraWb
rem -
taskkill /F /IM %oname%.exe
rem -
rem Delete exe
if exist %oname%.exe (
del %oname%.exe
)
rem -
rem - set new path
rem -
set pathold=%path%
set path=%path%;c:\minigui\harbour\bin;c:\borland\bcc58\bin
rem -
rem compile and link
rem -
rem hbmk2 TerraWb.hbp TerraWb.hbc minigui.hbc -inc -comp=bcc -beep -o%oname% -run -exitstr
hbmk2 TerraWb.hbp TerraWb.hbc c:\minigui\harbour\bin\minigui.hbc -inc -comp=bcc -beep -o%oname% -run -exitstr -Lc:\minigui\lib
rem -
rem - restore path
rem -
set path=%pathold%
set pathold=
rem -
echo .
rem pause
TERRAWB.HBP
Code: Select all
TerraWb.prg
wbimport.prg
rdwrini.prg
puproc.prg
msg.prg
TERRAWB.HBC
Code: Select all
incPaths=D:\TerraWb\include
libpaths=c:\borland\bcc58\lib
libs=hbwin calldll
gt=gtgui
mt=no
instpaths=
Re: Migration from HMG to HMG Minigui
Posted: Mon Mar 28, 2022 11:13 am
by serge_girard
Bedankt Marc,
Ik probeer en laat het weten!
Serge
Re: Migration from HMG to HMG Minigui
Posted: Mon Mar 28, 2022 11:28 am
by serge_girard
Marc,
't schiet al een eind op, maar nu dit:
Code: Select all
....
....
.hbmk\win\bcc\wk_verw_lbzk.c:
.hbmk\win\bcc\sysinvent.c:
hbmk2: Linking... newproj.exe
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Fatal: Unable to open file '_HBMKAUT_newproj.OBJ'
hbmk2[newproj]: Error: Running linker. 2
ilink32.exe @C:\Users\Serge\AppData\Local\Temp\1txwls.lnk
hbmk2[newproj]: Exit status: 7: failed in final assembly (linker or library manager)
Iets vergeten?
Re: Migration from HMG to HMG Minigui
Posted: Mon Mar 28, 2022 11:58 am
by serge_girard
Marc,
En nu de laatste stap:
Code: Select all
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_MYSQL_QUERY' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_STORE_RESULT' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_NUM_ROWS' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_NUM_FIELDS' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_FETCH_FIELD' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_DATA_SEEK' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_FETCH_ROW' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_ERROR' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_REAL_CONNECT' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_COMMIT' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_ROLLBACK' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_GET_SERVER_VERSION' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_SELECT_DB' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_LIST_DBS' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_LIST_TABLES' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
Error: Unresolved external '_HB_FUN_MYSQL_ESCAPE_STRING' referenced from C:\MINIGUI\newproj\.HBMK\WIN\BCC\MSYSQL.OBJ
hbmk2[newproj]: Error: Running linker. 2
ilink32.exe @C:\Users\Serge\AppData\Local\Temp\7fzwxk.lnk
hbmk2: Error: Referenced, missing, but unknown function(s): MYSQL_QUERY(),
MYSQL_STORE_RESULT(), MYSQL_NUM_ROWS(), MYSQL_NUM_FIELDS(),
MYSQL_FETCH_FIELD(), MYSQL_DATA_SEEK(), MYSQL_FETCH_ROW(),
MYSQL_ERROR(), MYSQL_REAL_CONNECT(), MYSQL_COMMIT(), MYSQL_ROLLBACK(),
MYSQL_GET_SERVER_VERSION(), MYSQL_SELECT_DB(), MYSQL_LIST_DBS(),
MYSQL_LIST_TABLES(), MYSQL_ESCAPE_STRING()
hbmk2[newproj]: Exit status: 7: failed in final assembly (linker or library manager)
Wat hiermee?
Re: Migration from HMG to HMG Minigui
Posted: Mon Mar 28, 2022 3:17 pm
by gfilatov
Hi Serge,
Please add in your .HBC config file the following string:
libs=hbmysql libmysql
I had tested the sample in the folder
c:\MiniGUI\Samples\Advanced\MySqlClient and all is OK with the above setting.

Re: Migration from HMG to HMG Minigui
Posted: Mon Mar 28, 2022 3:24 pm
by serge_girard
Thanks Grigory,
EXE has been created but it gives an error: cannot find ordinal 135 in DLL file.
In second new project I get error on GetStartUpFolder() ..?? hbmk2: Error: Referenced, missing, but unknown function(s): GETSTARTUPFOLDER()
hbmk2[INIT]: Exit status: 7: failed in final assembly (linker or library manager)
Re: Migration from HMG to HMG Minigui
Posted: Mon Mar 28, 2022 3:26 pm
by serge_girard
libmysql.dll is in my working folder and so are other DLL
Serge
Re: Migration from HMG to HMG Minigui
Posted: Mon Mar 28, 2022 3:37 pm
by gfilatov
serge_girard wrote: ↑Mon Mar 28, 2022 3:24 pm
Thanks Grigory,
EXE has been created but it gives an error: cannot find ordinal 135 in DLL file.
In second new project I get error on GetStartUpFolder() ..?? hbmk2: Error: Referenced, missing, but unknown function(s): GETSTARTUPFOLDER()
hbmk2[INIT]: Exit status: 7: failed in final assembly (linker or library manager)
Serge,
1) You should recreate the library libmysql with the following command line:
implib libmysql.lib libmysql.dll
and then place this library in your folder
c:\MiniGUI\harbour\lib
2) you can add the following definition in your program
#xtranslate GetStartUpFolder () => cFilePath( GetExeFilename() )
Re: Migration from HMG to HMG Minigui
Posted: Mon Mar 28, 2022 3:49 pm
by serge_girard
Thx,
Where do I execute: implib libmysql.lib libmysql.dll
implib is some EXE?