Building a HMG application

How I can build a HMG applications ?

Build.Bat / HMG-IDE


The easiest way is to use the ‘build.Bat’ file located at \hmg folder.


Build [/i|/r|/d|/cs|/ci/cr] <PrgFile> | <filelist.hbp> [config.hbc]

[/i] : incremental build

[/r] : incremental build (rebuild all)
[/cs] : Console/mixed mode (std build)

[/ci] : Console/mixed mode (incremental build)

[/cr] : Console/mixed mode (incremental rebuild all)
[/d] : Debug mode (gui and console)

<filelist.hbp> : A text file with .hbp extension containing a source list.

<configfile.hbc>: A text file with configuration parameters as additional libs, include paths and lib paths.

<configfile.hbc> Syntax:

incpaths = incpath1 incpath2 … incpathn

libpaths = libpath1 libpath2 … libpathn

libs = lib1 lib2 … libn

mt = yes (multi-threading support)
– library names must not include ‘lib’ prefix nor ‘.a’ extension.

– ‘build.bat’ will create an ‘error.log’ file in the app folder when build process ends with an error condition.

– <.hbc> files in the current folder are automatically processed.



This programming environment allows visual form editing and application build.

Environment settings (HMG Folder, Program Editor, etc.) are stored in ‘.ini’ files, located at IDE folder.You can interactively change default settings (Main Menu->Tools->Preferences).

In IDE, all build customizations must be handled by the user from ‘Configuration’ (project browser) tab. It is direct edit of the project .hbc file. Look at hbmk2 help for details. By default two gt drivers are ALWAYS linked: GTGUI (as default) and GTWIN (Windows console). To create console/mixed mode apps. you only must add this line to your main .prg: HB_GT_WIN_DEFAULT

When upgrading HMG, please, clean previous build data from your projects using incremental building. From command line, you must add the -clean parameter. From IDE, use the ‘Reset project incremental data’ option from the project menu.


Note:  This post borrowed from official HMG Docs.

One response to “Building a HMG application

  1. Pingback: How I can build … | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.