Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

core

> 编程语言
Open source

Portable, xBase compatible programming language and environment

399 stars0 likes1 views
WebsiteGitHub

About

Portable, xBase compatible programming language and environment

Welcome to Harbour

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.

Table of Content

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

Guarantees and Liability

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.

How to Participate

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:

    1. Fork Harbour
    2. Create a branch: git checkout -b my_mod
    3. Do commit pre-check and new log entry: hbrun bin/commit
    4. Commit your changes: git commit -am "Added my feature"
    5. Push to the branch: git push origin my_mod
    6. Open a Pull Request
  • Always 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

    • Encoding is either 7-bit ASCII or UTF-8 (without BOM)
    • Always use spaces, never tabs
    • Remove trailing spaces from lines
    • Always keep one (not zero or multiple) newline at the end of file
    • Use platform native newline (CRLF or LF)
  • 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:

How to Get

Stable versions

The latest official stable release is 3.2.0 (2026-07-07). See the homepage for project status and GitHub Releases for downloads.

Harbour stable binary download

Download binary archive from this page and unpack or install:

(choose the highest version number)

  • (when published)

Harbour stable source download

Download source archive from this page and unpack:

(choose the highest version number)

  • (when published)

Unstable versions

WARNING: Recommended for users contributing to Harbour development, following the development mailing list, commits and reading ChangeLog.txt.

Harbour live source repository

You'll need Git version control software installed on your system, and issue this command:

bash
git clone https://github.com/harbour/core.git harbour-core

You can get subsequent updates using this command:

bash
git pull

Harbour unstable sources

Download source archive from any of these links and unpack:

Harbour unstable binaries (updated once a day from live source repository)

Windows (unified):

Follow commits using any of these facilities

  • Web
  • RSS
  • Twitter
  • E-mail
  • Mac app
  • Mac tool

How to Build

Before reporting a problem to developers, make sure to read Troubleshooting and try the suggestions you find there.

For all platforms you'll need:

  • Supported ANSI C compiler
  • GNU Make (3.81 recommended, minimum 3.79 required, see also platform details)
  • Harbour sources (2.0.0 or upper)

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

Platform specific prerequisites:

  1. Windows XP or upper system is recommended to build Harbour.
  2. Make sure to have your C compiler of choice properly installed in PATH. Refer to your C compiler installation and setup instructions for details. It's recommended to make sure no tools in your PATH belonging to other C compilers are interfering with your setup. It's also highly discouraged 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.
  3. GNU Make 3.81 or upper is required. A copy of this tool is included in all Harbour packages, so you don't have to do anything. If you want to get it separately, you can find it here Unpack it to your PATH or Harbour source root directory, and run it as mingw32-make.

To build:

> win-make [install]

To test it, type:

> cd tests
> ..\bin\hbmk2 hello.prg
> hello

You should see Hello, world! on screen.

on Windows hosts with POSIX shells (MSYS/Cygwin)

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
> hello

You 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.

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

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.

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

To build:

> os2-make [install]

To test it, type:

> cd tests
> ..\bin\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 [install] [HB_PLATFORM=]

To test it, type:

$ cd tests
$ hbmk2 hello.prg
$ ./hello

You should see Hello, world! on screen.

on Darwin (OS X) hosts (possible cross-build targets: Windows, Windows CE, MS-DOS)

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
$ ./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:

Intel 32-bit: -arch i386

Intel 64-bit: -arch x86_64

PPC 32-bit: -arch ppc

PPC 64-bit: -arch ppc64

on FreeBSD hosts

Platform specific prerequisites:

  1. You'll need to have the developer tools installed.

  2. 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 clean

To build:

$ gmake install

To test it, type:

$ cd tests
$ 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.

Optionally, GCC may also be installed if you wish to use that instead of Clang, the Minix system compiler.

on other *nix hosts (possible cross-build targets: Windows, Windows CE, MS-DOS)

To build:

$ gmake [install] [HB_PLATFORM=]

Or

$ make [install] [HB_PLATFORM=]

To test it, type:

$ cd tests
$ hbmk2 hello.prg
$ ./hello

You 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.

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 want to build. When starting GNU Make, all components under that dir will be built:

bash
cd src/rtl
 [clean] [install]

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

bash
cd contrib
hbmk2 make.hb  [clean] [custom hbmk2 options]

How to Create Distributable Packages

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 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· 53 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言