HMG -> 64bit 101

Moderator: Rathinagiri

Post Reply
melliott42
Posts: 119
Joined: Wed Feb 18, 2009 2:14 pm

HMG -> 64bit 101

Post by melliott42 »

Hello all,

I really like the HMG page http://www.hmgextended.com/gettingstarted.html. Kudos!

Thanks to this page, for 32-bit I understand what to download and the steps.

For 64-bit though I dont quite have it. Can someone please list the baby steps to configure a development PC system to exclusively use\dev 64-bit HMG applications?


Thanks,

Michael
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: HMG -> 64bit 101

Post by mustafa »

Attachments
Imagen2.jpg
Imagen2.jpg (29.19 KiB) Viewed 20338 times
melliott42
Posts: 119
Joined: Wed Feb 18, 2009 2:14 pm

Re: HMG -> 64bit 101

Post by melliott42 »

Wow this looks great! Mustafa thanks. I have it working now too!

Here is what I did to get it working (cheat sheet from the links and image you provided):

0) Download Harbour and install the latest HMG. I used the BBS "Download HMG" link here to do this.
This creates the folder: c:\hmg.3.4.x

1) Download Harbour and MinGW in 64-bit from Here: claudio/MinGW-64%20and%20Harbour-64%20( ... 11-24).rar

2) Unzip file in folder: c:\hmg.3.4.x

I used 7zip to uncompress a the .rar file.

3) Run c:\hmg.3.4.x\_BuildAllLib64.bat

To build 64-bit apps use c:\hmg.3.4.x\build64.bat

Note to use the HMG IDE set the Build menu to 64-bits.


HMG has come a long long way. The most ideal install would be just one (1) setup.exe that does the above but this is pretty close given all the hard work that has been done. Kudos to you all!
User avatar
joerg
Posts: 10
Joined: Tue Sep 25, 2012 4:08 pm
DBs Used: DBF; mySQL
Location: Austria
Contact:

Re: HMG -> 64bit 101

Post by joerg »

Thank you very much for all those detail instructions. I developed a major application (ERP system) in HMG using mySQL instead of .dbf files. This application builds fine in 32 bit.
When following your instructions to build in 64 bit I encountered the following two problems

* Problem (I) error in _BuildLib64.bat / _BuildAllLib64 with h_windows.c
When running _BuildLib64.bat or _BuildAllLib64 in 1 ANSI AND 2 UNICODE I encountered error
...
Lines 22594, Functions/Procedures 69
Generating C source output to 'C:\Users\hjg2015\AppData\Local\Temp\hbmk_bbp3vp.dir\h_windows.c'... Done.
hbmk2[hmg64]: Error: Running lib command. -1

...
After this error the .bat processing didn't proceed, directory LIB-64 is empty

* Problem (II) missing contrib directories
C:\hmg.3.4.3\HARBOUR-64\contrib
doesn't contain sub directories hbmysql and hbssl which are essential for my ERP system.
I copied those directories from
C:\hmg.3.4.3\HARBOUR\contrib

The compile in build64.bat seems to work after copying the contrib directories. But linking seems to fail:
...
Copyright (c) 1999-2016, http://harbour-project.org/
C:/WENE21DEVELOP/01_source/_temp.o: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
hbmk2: Error: Running linker. 1
i686-w64-mingw32-gcc.exe C:/Users/hjg2015/AppData/Local/Temp/hbmk_313t76.dir/w.o C:/Users/hjg2015/AppData/Local/Temp/h
k_313t76.dir/hbmk_rt6o6y.o C:/WENE21DEVELOP/01_source/_temp.o -mwindows -Wl,--start-group -l"hmg-64" -l"crypt-64" -
edit-64" -l"editex-64" -l"graph-64" -l"ini-64" -l"report-64" -l"hfcl-64" -l"hbvpdf-64" -lmsvfw32 -lvfw32 -lhbct -lhbwi
-lhbmzip -lminizip -lhbmemio -lhbmisc -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lhbodbc -lodbc32 -lhbhpdf -lhbn
io -lxhb -lpng -llibhpdf -lhbzebra -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -l
win -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacr
-lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl3
-lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib
l,--end-group -ow.exe -L"C:/hmg.3.4.3/harbour-64/lib/win/mingw64" -L"C:/hmg.3.4.3/lib-64"

...
I think this is due to "Problem (I) error in _BuildLib64.bat / _BuildAllLib64". Does any one have an idea on how to fix that problem?
Thanks a lot
Joerg
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: HMG -> 64bit 101

Post by mustafa »

Hola joerg :
Siga estos paso de este Pos de Rathinagiri
1º- viewtopic.php?f=43&t=4738&hilit=rathi
2º- You can download this latest version from here (64 MB) <-HMG 3.4.3 64 bits
3º For 64 Bit developers, you have to download and install Harbour64 and MingW64 from here
(15 MB) and here (71 MB)respecitvely. -> Harbour64 and MingW64
4º si no tiene la LIB-64 aqui le dejo la que estoy usando
5º Ejecutar -> _BuildAllLib64.bat
y creo que tendria que funcionar el IDE tienes que ponerlo en Menu Build a -> 64Bits
Saludos
*-------------------------------- Google --------------------------*
Hello joerg :
Follow these step in this Pos Rathinagiri
1º- viewtopic.php?f=43&t=4738&hilit=rathi
2º- You can download this latest version from here (64 MB) <-HMG 3.4.3 64 bits
3º For 64 Bit developers, you have to download and install Harbour64 and MingW64 from here
(15 MB) and here (71 MB)respecitvely. -> Harbour64 and MingW64
4º if you do not have the LIB-64 I leave here I'm using
5º Run -> _BuildAllLib64.bat
and I think it would have to run the IDE have to put on a Build Menu -> 64Bits
regards
Mustafa
Attachments
LIB-64.ZIP
(706.75 KiB) Downloaded 665 times
User avatar
joerg
Posts: 10
Joined: Tue Sep 25, 2012 4:08 pm
DBs Used: DBF; mySQL
Location: Austria
Contact:

Re: HMG -> 64bit 101

Post by joerg »

Hello Mustafa!

Thanks a lot for providing the LIB-64 files.

I copied them into C:\hmg.3.4.3\LIB-64
When I run _BuildAllLib64.bat again
I get the following errors:
...
Generating C source output to 'C:\Users\hjg2015\AppData\Local\Temp\hbmk_cimeot.dir\hbvpsup.c'... Done.
hbmk2[hbvpdf-64]: Error: Running lib command. -1
i686-w64-mingw32-ar.exe rcs "../../lib-64/libhbvpdf-64.a" C:/Users/hjg2015/AppData/Local/Temp/hbmk_cimeot.dir/hbvpdf.o
:/Users/hjg2015/AppData/Local/Temp/hbmk_cimeot.dir/hbvpdft.o C:/Users/hjg2015/AppData/Local/Temp/hbmk_cimeot.dir/hbvps
.o
...
Generating C source output to 'C:\Users\hjg2015\AppData\Local\Temp\hbmk_u3m78j.dir\h_ini.c'... Done.
hbmk2[ini-64]: Error: Running lib command. -1
i686-w64-mingw32-ar.exe rcs "../../lib-64/libini-64.a" C:/Users/hjg2015/AppData/Local/Temp/hbmk_u3m78j.dir/h_ini.o C:/Us
ers/hjg2015/AppData/Local/Temp/hbmk_u3m78j.dir/c_ini.o
...
Generating C source output to 'C:\Users\hjg2015\AppData\Local\Temp\hbmk_6dsjyp.dir\tprint.c'... Done.
hbmk2[report-64]: Error: Running lib command. -1
i686-w64-mingw32-ar.exe rcs "../../lib-64/libreport-64.a" C:/Users/hjg2015/AppData/Local/Temp/hbmk_6dsjyp.dir/h_report.o
C:/Users/hjg2015/AppData/Local/Temp/hbmk_6dsjyp.dir/tprint.o
...
When trying b64 on my application there is still error
...
Harbour 3.2.0dev (r1604201603)
Copyright (c) 1999-2016, http://harbour-project.org/
C:/WENE21DEVELOP/01_source/_temp.o: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
hbmk2: Error: Running linker. 1
i686-w64-mingw32-gcc.exe C:/Users/hjg2015/AppData/Local/Temp/hbmk_1i7vud.dir/w.o C:/Users/hjg2015/AppData/Local/Temp/hbm
k_1i7vud.dir/hbmk_g63k3u.o C:/WENE21DEVELOP/01_source/_temp.o -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" -l"hbvpdf-64" -lmsvfw32 -lvfw32 -lhbct -lhbwin
-lhbmzip -lminizip -lhbmemio -lhbmisc -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lhbodbc -lodbc32 -lhbhpdf -lhbnet
io -lxhb -lpng -llibhpdf -lhbzebra -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgt
win -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro
-lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl32
-lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -W
l,--end-group -ow.exe -L"C:/hmg.3.4.3/harbour-64/lib/win/mingw64" -L"C:/hmg.3.4.3/lib-64"
...
I copied the LIB-64 files again from your .ZIP to C:\hmg.3.4.3\LIB-64 but the error persists.

KR
Joerg
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: HMG -> 64bit 101

Post by mustafa »

Hola amigo joerg
El error no se a que pueda deverse, has seguido las instrucciones
que te mande ?
de la Página que puso Rathinagiri -> HMG 3.4.3

viewtopic.php?f=43&t=4738&hilit=rathi

descarga:
You can download this latest version from "here" (64 MB) <- Pulsa donde pone "here"

y luego tambien en "here" las librerias Harbour64 and MingW64
For 64 Bit developers, you have to download and install Harbour64 and MingW64 from "here" (15 MB) and "here" (71 MB)respecitvely.

Crea un directorio como tengo yo -> hmg.3.4.3_64 luego instala HMG 3.4.3 64 bits, pon HARBOUR-64 y MinGW-64 como yo te lo pongo
luego pones la LIB-64 que mande a la Web y pasa _BuildAllLib64.bat ejecuta

1.- ANSI Y 2 UNICODE , tarda un poco espera a que termine todo en cuadro cmd- de DOS

Luego los HMG-IDE en menú Build 64-bits

yo no suelo trabajar con el HMG-IDE trabajo con un fichero bat -> build.3.4.3_64.bat y dentro le pongo lo siguiente:

@ECHO OFF
call c:\hmg.3.4.3_64\build64.bat Main %*

Main es el fichero que quiero compilar tienes que sustituirlo por el nombre del
fichero principal de tu aplicación que quieras que sea el EXE.

Fijate mas arriba en el pantallazo que monte para la versión anterior HMG 3.4.2_64 es lo mismo pero
esta vez la carpeta tiene que ser c:\hmg.3.4.3_64


Si el Error persiste, no se que puede ser ?, haber si algun compañero del foro puede colaborar
En mi equipo Win 10 Home a 64 bits está funcionando muy bien.
Saludos

*---------------------------------------------- Google ------------------------------------------------------------*
Hello friend joerg
The error that can not deverse, you followed the instructions
you send?
the page that put Rathinagiri -> HMG 3.4.3

viewtopic.php?f=43&t=4738&hilit=rathi

discharge:
You can download esta latest version from "here" (64 MB) <- Click where it says "here"


discharge:
You can download latest version esta from "here" (64 MB) <- Click where it says "here"
and then also in "here" Harbour64 libraries and MingW64
For 64 Bit developers, You have to download and install Harbour64 and MingW64 from "here" (15 MB) and "here" (71 MB) respecitvely.

Create a directory like I have -> c:\hmg.3.4.3_64 then install HMG 3.4.3 64-bit, put MinGW HARBOUR-64 and I-64 and I put
then put the LIB-64 to send to the Web and passes _BuildAllLib64.bat runs
 
1.- ANSI and 2.- UNICODE, takes a little wait to finish everything in Cmd- DOS box

After the HMG-IDE -> Build menu 64-bit

I do not usually work with the HMG-IDE I work with a bat file -> build.3.4.3_64.bat and inside I put the following:

@ECHO OFF
call c:\hmg.3.4.3_64\build64.bat Main% *

Main is the file you want to compile have to replace it with the name of
main file of your application you want it to be the EXE.

Fijate higher on the screenshot to mount for the previous version 3.4.2_64 HMG is the same but
This time the folder must be c:\hmg.3.4.3_64

If the error persists, not can it be?, Have if some fellow forum can help
In my team Home Win 10 to 64 bits is working very well.
regards
Mustafa  :(
 
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: HMG -> 64bit 101

Post by RPC »

Great help by Mustafa and melliott42. Due to your help I got my first 64bit program running.
I couldn't rebuild lib for 64 using _BuildAllLib64 building process stopped before all libraries could be built.
Mutafa's lib-64.zip file came very helpful. :D
Post Reply