便携式、与 xBase 兼容的编程语言和环境
Harbour is the free software implementation of a multi-platform, multi-threading, object-oriented, scriptable programming language, backward compatible with Clipper/xBase. Harbour consists of a compiler and runtime libraries with multiple UI and database backends, its own make system and a large collection of libraries and interfaces to many popular APIs.
This document and all other parts of Harbour are distributed in the hope they will be useful, but there is NO GUARANTEE that they are complete, accurate, non-infringing or usable for any purpose whatsoever. Contributors are NOT LIABLE for any damages that result from using Harbour in any ways. For more legal details, see LICENSE.
If you think you can make Harbour better, start to contribute. See How to Participate.
The information this document is subject to change without notice and does not represent any future commitment by the participants of the project.
There are several ways to help making Harbour better:
You can give feedback/suggestions to developers on available channels, see Harbour Links.
Submit a change:
git checkout -b my_modhbrun bin/commitgit commit -am "Added my feature"git push origin my_modAlways use the same coding/formatting style as you find in the files you're modifying. The easiest way to achieve this is to use these commands to format the sources:
$ uncrustify -c /bin/harbour.ucf
$ /bin/hbformat
Text editor setting for Harbour files
In the rare case you need to send something large (> 100KB), use this free service.
Of course, there is more into Harbour contribution than writing code, so you're welcome to do so in other areas like documentation, helping fellow users, giving input on decisions, testing in various environments, volunteering in administration tasks, etc.
Participate in localization:
The latest official stable release is 3.2.0 (2026-07-07). See the homepage for project status and GitHub Releases for downloads.
Download binary archive from this page and unpack or install:
(choose the highest version number)
Download source archive from this page and unpack:
(choose the highest version number)
WARNING: Recommended for users contributing to Harbour development, following the development mailing list, commits and reading ChangeLog.txt.
You'll need Git version control software installed on your system, and issue this command:
git clone https://github.com/harbour/core.git harbour-coreYou can get subsequent updates using this command:
git pullDownload source archive from any of these links and unpack:
Windows (unified):
Before reporting a problem to developers, make sure to read Troubleshooting and try the suggestions you find there.
For all platforms you'll need:
Platform specific prerequisites:
mingw32-make.To build:
> win-make [install]To test it, type:
> cd tests
> ..\bin\hbmk2 hello.prg
> helloYou should see Hello, world! on screen.
Though you can use these alternative shells to build Harbour on Windows, it's generally recommended to use the native one.
To build:
> sh -c make [install]To test it, type:
> cd tests
> ..\bin\hbmk2 hello.prg
> helloYou should see Hello, world! on screen.
When building for Borland C++ make sure that GNU Make is executed when typing
make, Borland Make has the same name.
Make sure to have your C compiler of choice properly installed in PATH.
To build:
> dos-make [install]To test it, type:
> cd tests
> ..\bin\hbmk2 hello.prg
> hello You should see Hello, world! on screen.
To build:
> os2-make [install]To test it, type:
> cd tests
> ..\bin\hbmk2 hello.prg
> helloYou should see Hello, world! on screen.
To build:
$ make [install] [HB_PLATFORM=]To test it, type:
$ cd tests
$ hbmk2 hello.prg
$ ./helloYou should see Hello, world! on screen.
Platform specific prerequisite: Xcode or Command Line Tools for Xcode installed
To build:
$ make [install] [HB_PLATFORM=]To test it, type:
$ cd tests
$ hbmk2 hello.prg
$ ./helloYou should see Hello, world! on screen.
You can override default (host) architecture by adding values below to
HB_USER_CFLAGS,HB_USER_LDFLAGSenvvars, you can use multiple values:
Intel 32-bit:
-arch i386
Intel 64-bit:
-arch x86_64
PPC 32-bit:
-arch ppc
PPC 64-bit:
-arch ppc64
Platform specific prerequisites:
You'll need to have the developer tools installed.
Then you'll need to install gmake and optionally bison. If you installed the ports collection, then all you need to do to install bison and gmake is to run the following commands, which may require that you run su root first to get the correct permissions:
$ cd /usr/ports/devel/gmake
$ make
$ make install
$ make clean
$ cd /usr/ports/devel/bison
$ make
$ make install
$ make cleanTo build:
$ gmake installTo test it, type:
$ cd tests
$ hbmk2 hello.prg
$ ./helloYou should see Hello, world! on screen.
Install GNU make from the Minix pkgsrc repository; for details see here.
Optionally, GCC may also be installed if you wish to use that instead of Clang, the Minix system compiler.
To build:
$ gmake [install] [HB_PLATFORM=]Or
$ make [install] [HB_PLATFORM=]To test it, type:
$ cd tests
$ hbmk2 hello.prg
$ ./helloYou should see Hello, world! on screen.
For sunpro on Solaris:
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.
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 want to build. When starting GNU Make, all components under that dir will be built:
cd src/rtl
[clean] [install]If you want to rebuild one specific contrib package, use this:
cd contrib
hbmk2 make.hb [clean] [custom hbmk2 options]$ package/mpkg_src.sh$ export HB_BUILD_PKG=yes
$ make clean install$ fakeroot debian/rules binary$ package/mpkg_rpm.shYou can fine-tune the build with these options:
--with static - link all binaries with static libs
--with ads - build components dependent on ads (rddads)
--with allegro - build components dependent on allegro (gtalleg)
--with cups - build components dependent on cups (hbcups)
--with cairo - build components dependent on cairo (hbcairo)
--with curl - build components dependent on libcurl (hbcurl)
--with firebird - build components dependent on firebird (hbfbird, sddfb)
--with freeimage - build components dependent on freeimage (hbfimage)
--with gd - build components dependent on gd (hbgd)
--with mysql - build components dependent on mysql (hbmysql, sddmy暂无开放 Issues,或尚未同步最近议题。