hmg4 compilation problem

Moderator: Rathinagiri

Post Reply
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

hmg4 compilation problem

Post by l3whmg »

Hi to everyone
Today I discovered a problem about the system used to compile end programs and (perhaps) about HMG library.
I think we must change all batch files, remove usage of hbmk.hbm and introduce usage of .hbp and .hbc for every demo folder.

I show my intention, using folders structure ( notice: all previous .hbp, .hbc, .hbm, .bat will be removed )

svn/source/buildlib.bat
svn/source/hmglib.hbp
svn/buildapp.bat
svn/samples/demofolder/build.bat
svn/samples/demofolder/xxxx.prg
svn/samples/demofolder/xxxx.hbp
svn/samples/demofolder/hmg.hbc

little brief about some files

A) buildlib.bat (see (2) )

Code: Select all

SET HMGLOG=hmg_errorlog.txt
hbmk2 hmglib.hbp -trace > %HMGLOG% 2>&1
SET HMGLOG=
B) hmglib.hbp

Code: Select all

-hblib
-inc
-o../lib/hmg   <== remember: we are within source folder. ../lib is needed to store in the right place
-I../include    <== remember: we are within source folder. this is needed to localize hmg include folder 
-w3
-es2
sourcename1.prg
sourcenameN.prg
C) buildapp.bat (see (2) )

Code: Select all

SET HMGLOG=hmg_errorlog.txt
SET GUI=-gtgui
hbmk2 -o%~n1.exe %GUI% -trace %1 > %HMGLOG% 2>&1
SET HMGLOG=
SET GUI=
D) build.bat

Code: Select all

..\..\buildapp.bat %1    <== I removed "-run" option because it's dangerous. when there is some AV installed or wrong privileges
E) about xxxxx.hbp file

Code: Select all

-w3
-es2
hmg.hbc
xxxxx.prg can be more than one
?????.qrc if needed
F) about hmg.hbc within any folder

Code: Select all

incpaths=../../Include  <== need this to find hmg4 include folder
libpaths=../../Lib      <== need this to find hmg4 lib folder

libs=hbqt.hbc
libs=hbct.hbc <== see  (1)
libs=hmg     <== I'm using compiled library, not hbc
(1) this because HMG uses some functions to test keyboard status. But it can be used only on Windows System. As I write some time ago: I think must be removed its usage

(2) theoretically we must also introduce
SET HB_COMPILER=mingw <== to tell mingw usage....
SET HRBBIN=HarbourBinPath <== but everyone can have different value (remember: someone doesn't uses Harbour of HMG distribution)

Rathinagiri (and everyone):
1) please, could you tell me if this can create problem with HMG4 distribution
2) about HRBBIN setting: by default HMG4 package is C:\Hmg4 ? I'm always dowoload SVN and I don't remember. I can set this value as default.

Is there someone who want to do this job?

Cheers
Luigi from Italy
www.L3W.it
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: hmg4 compilation problem

Post by mrduck »

Hi Luigi
l3whmg wrote:Hi to everyone
Today I discovered a problem about the system used to compile end programs and (perhaps) about HMG library.
Which problem did you discover ?
I think we must change all batch files, remove usage of hbmk.hbm and introduce usage of .hbp and .hbc for every demo folder.

Until you explain the problem I'm absolutely contrary to any change !
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg4 compilation problem

Post by l3whmg »

Hi MrDuck
AFAIK with this changes, for example, the current usage of hbct (to check keyboard status) works fine. If you try this little changes within samples/alldemo folder, your statuskeyboard flags work fine.
I don't know why, but this is.
Today, with current compilation system (I'm speaking about *.bat and *.hbm and so on) it doesn't work.
Where is the problem? Library conflict? Harbour or linking problems? I don't known.
I only check that this new "system" work (and somewhere I read: usage of .hbp instead .hbm is reccomended by Harbour developpers. I'm sorry I don't remember where).
As you can see there isn't great differences with previous and, for example, HBIde work fine with .hbp.
So this is an experimented solution. I do not have "technical elements" to show why.

Cheers
Luigi from Italy
www.L3W.it
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: hmg4 compilation problem

Post by mrduck »

really strange....

please check with -trace -info if there is a different directory linking order or something similar.

I have not compiled hmg4 on linux for a while, but if these functions are not supported under linux, they must not be present in hmg4
Post Reply