SkillAgentSearch skills...

Hb

Harbour fork (from https://github.com/harbour/core) + updates & fixes = 3.4

Install / Use

/learn @vszakats/Hb
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Welcome to Harbour

License Download <br> Build status Coverity Status

Harbour is the open/free software implementation of a cross-platform, multi-threading, object-oriented, scriptable programming language, backwards compatible with xBase languages. Harbour consists of a compiler and runtime libraries with multiple UI, database and I/O backends, its own build system and a collection of libraries and bindings for popular APIs.

Table of Contents

  1. How to Get
  2. How to Build
  3. How to Do a Partial Build
  4. How to Create Packages for Distribution
  5. How to Enable Optional Components
  6. Build Options
  7. Build Examples
  8. Build Your Own Harbour App
  9. Debugging Options
  10. Supported Platforms and C Compilers
  11. Platform Matrix
  12. External Links
  13. Harbour Links
  14. Guarantees and Liability

How to Get

Stable versions (non-fork/mainline)

Harbour stable binary download

https://github.com/vszakats/hb/releases/tag/v3.0.0

NOTE: It is identical to the mainline stable release, but not supported or recommended by this fork.

Harbour stable source download

https://github.com/vszakats/hb/archive/v3.0.0.zip

Unstable versions

TIP: For users contributing to development, it's recommended to follow commits and reading ChangeLog.txt.

Harbour live source repository

You will need Git version control software installed on your system and use this command (remove the --depth option to clone the whole history — useful for development):

git clone --depth=10 https://github.com/vszakats/hb.git

You can get subsequent updates using this command:

git pull

Harbour unstable sources

Download source archive from any of these URLs and unpack:

Harbour unstable binaries (updated after each commit)

Windows (MinGW, 64-bit hosted, 32/64-bit targets, compressed archive)

Mac (using Homebrew)

brew install https://raw.githubusercontent.com/vszakats/hb/main/package/hb@3.4.rb --HEAD

Follow commits using:

How to Build

For all platforms you will need:

  • Supported ANSI C89 compiler
  • GNU Make (3.81 or upper)
  • Harbour sources

on Windows hosts

Platform specific prerequisites:

  1. Windows 7 or upper system is recommended to build Harbour. (64-bit edition is recommended.)
  2. Consider using the binary release. On Windows, it is recommended for most people. You can still rebuild specific contribs this way.
  3. Make sure to have your C compiler of choice installed in PATH. Refer to your C compiler installation and setup instructions for details. Make sure no tools in your PATH belonging to other C compilers are interfering with your setup. Also avoid to keep multiple copies of the same compiler, or different versions of the same compiler in PATH at the same time. For the list of supported compilers, look up Supported Platforms and C Compilers.
  4. A native build of GNU Make is required. It is usually named mingw32-make.exe. It's distributed in MSYS2, mingw-w64 packages. You can find download links here. Unpack it to your PATH or Harbour source root directory, and run it as mingw32-make.

To build:

$ mingw32-make

To test it, type:

$ cd tests
$ ..\bin\<plat>\<comp>\hbmk2 hello.prg
$ hello

You should see Hello, world! on screen.

on Windows hosts with POSIX shells (MSYS2)

To build:

$ sh -c make

To test it, type:

$ cd tests
$ ..\bin\<plat>\<comp>\hbmk2 hello.prg
$ hello

You should see Hello, world! on screen.

on Linux hosts (possible cross-build targets: Windows, Windows CE, MS-DOS, OS/2)

To build:

$ make [HB_PLATFORM=<...>]

To test it, type:

$ cd tests
$ ../bin/<plat>/<comp>/hbmk2 hello.prg
$ ./hello

You should see Hello, world! on screen.

on Darwin (Mac) hosts (possible cross-build targets: Windows)

Platform specific prerequisite: Xcode or Command Line Tools for Xcode installed

To build:

$ make [HB_PLATFORM=<...>]

To test it, type:

$ cd tests
$ ../bin/<plat>/<comp>/hbmk2 hello.prg
$ ./hello

You should see Hello, world! on screen.

You can override default (host) architecture by adding values below to HB_USER_CFLAGS, HB_USER_LDFLAGS envvars, you can use multiple values:<br> <br> ARM64: -arch arm64<br> Intel 64-bit: -arch x86_64<br>

on FreeBSD hosts

Platform specific prerequisites:

  1. You will need to have the developer tools installed.

  2. Then you will need to install gmake and optionally bison:

     $ pkg install gmake bison
    

To build:

$ gmake

To test it, type:

$ cd tests
$ ../bin/<plat>/<comp>/hbmk2 hello.prg
$ ./hello

You should see Hello, world! on screen.

on Minix hosts

Install GNU make from the Minix pkgsrc repository; for details see here.

You may also install GCC, if you wish to use that instead of Clang, the Minix system compiler.

on other *nix hosts

To build:

$ gmake [HB_PLATFORM=<...>]

Or

$ make [HB_PLATFORM=<...>]

To test it, type:

$ cd tests
$ ../bin/<plat>/<comp>/hbmk2 hello.prg
$ ./hello

You should see Hello, world! on screen.

For sunpro on Solaris:<br> If you have any GNU binutils stuff installed, do make sure /usr/ccs/bin (the location of the native Sun C compilation system tools) come before the GNU binutils components in your $PATH.

How to Do a Partial Build

If you want to build only a specific part of Harbour, like one core library or all core libraries, or all contrib packages, you have to do everything the same way as for a full build, the only difference is that you first have to go into the specific source directory you'd like to build. When starting GNU Make, all components under that directory will be built:

cd src/rtl
<make> [clean]

If you want to rebuild one specific contrib package, use this:

On *nix systems

$ cd contrib/<name>
$ make.hb [clean] [custom hbmk2 options]

On Windows

$ cd contrib/<name>
$ hbmk2 make.hb [clean] [custom hbmk2 options]

Where make.hb and hbmk2 must be in PATH.

How to Create Packages for Distribution

Source .tgz on *nix

$ package/mpkg_src.sh

Binary .tgz on *nix

$ export HB_BUILD_PKG=yes
$ make clean install

Binary .deb on Linux

$ fakeroot debian/rules binary

Binary .rpm on Linux

$ package/mpkg_rpm.sh

You can fine-tune the build with these options:

--with static      - link all binaries with static libs
--with localzlib   - build local copy of zlib library
--with localpcre2  - build local copy of pcre2 library
--with localpcre1  - build local copy of pcre1 library
--without x11      - do not build components dependent on x11 (gtxwc)
--without curses   - do not build components dependent on curses (gtcrs)
--without slang    - do not build components dependent on slang (gtsln)
--without gpllib   - do not build components dependent on GPL 3rd party code
--without gpm      - build components without gpm support (gttrm, gtsln, gtcrs)

Binary .rpm on Linux (cross-builds)

for Windows

$ package/mpkg_rpm_win.sh

for Windows CE

$ package/mpkg_rpm_wce.sh

Binary .7z archive on Windows for all targets (except Linux)

$ set HB_DIR_7Z=C:\7-zip\
$ set HB_BUILD_PKG=yes

Then run build as usual with clean install options. See: How to Build

How to Enable Optional Components

Certain Harbour parts — typically contrib packages — depend on 3rd party components. To make these Harbour parts built, you need to tell Harbour where to find the headers for these 3rd party components.

On *nix systems most of these 3rd party components will automatically be used if installed on well-known standard system locations.

You only need to use manual setup if the dependency isn't available on your platform on a system location, or you wish to use a non-standard location. Typically, you need to do this on non-*nix (e.g. Windows) systems for all packages and for a few packages on *nix that are not available via official package managers (e.g. ADS Client).

Note that Harbour will use 3rd party binary packages in their default, unmodified — "vanilla" — install layout created by their official/mainstream install kits. If you manually move, rename, remove, add files under the 3rd party packages' root directory, or use a source package,

View on GitHub
GitHub Stars92
CategoryDevelopment
Updated1mo ago
Forks97

Languages

C

Security Score

85/100

Audited on Feb 25, 2026

No findings