๐ข Install Harbour
Set up the Harbour compiler on your system. Select your OS for instructions.
# Install dependencies (Ubuntu/Debian example) sudo apt update sudo apt install build-essential git # Clone and build Harbour cd $XBASE_WORKSPACE git clone https://github.com/harbour/core.git harbour-core cd harbour-core make sudo make install # Verify installation hbmk2 --version
$XBASE_WORKSPACE
is set (see Workspace Setup).
# Using MinGW-w64 (example with MSYS2) pacman -S mingw-w64-x86_64-gcc git # Clone and build Harbour cd %XBASE_WORKSPACE% git clone https://github.com/harbour/core.git harbour-core cd harbour-core make make install # Add to PATH (PowerShell example) $Env:PATH += ";%XBASE_WORKSPACE%\harbour-core\bin" # Verify installation hbmk2 --version
# Install Homebrew (if not installed) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install dependencies brew install gcc git # Clone and build Harbour cd $XBASE_WORKSPACE git clone https://github.com/harbour/core.git harbour-core cd harbour-core make sudo make install # Verify installation hbmk2 --version
xcode-select --install
if needed.
Why Harbour?
Harbour is a modern, open-source xBase compiler that supports cross-platform development with robust C-based architecture. It's ideal for porting legacy xBase apps or building new ones.
๐ Create Your First Harbour Project
Set up a basic Harbour project structure and compile a simple program.
# Create project directory mkdir -p $XBASE_WORKSPACE/HB_Projects/my_first_app cd $XBASE_WORKSPACE/HB_Projects/my_first_app # Create a simple Harbour program (main.prg) cat << EOF > main.prg #include "hbgtinfo.ch" PROCEDURE Main() ? "Hello, Harbour!" hb_gtInfo( HB_GTI_ISGRAPHIC, .F. ) // Console mode RETURN EOF # Compile and run hbmk2 main.prg ./main
hbmk2
for building Harbour projects. Check the docs for advanced build options.
Project Structure Recommendations
- Store source files in
$XBASE_WORKSPACE/HB_Projects/[project_name]
. - Use
.prg
for Harbour source files. - Include dependencies in a
lib
subdirectory. - Consider using
.hbp
files for complex builds.
๐ ๏ธ Harbour Resources & Tools
Explore tools, libraries, and community resources for Harbour development.
Harbour Core
The core Harbour compiler and runtime libraries.
Contributing to Harbour
Join the Harbour community by contributing code, reporting issues, or sharing your projects. Check the GitHub repo for guidelines.
๐ Community & Discussions
Join the Harbour community to ask questions, share ideas, or collaborate on projects.
๐ธ Screenshots & Visual Guide
Visual steps for setting up and using Harbour.
Harbour Build Process

Building Harbour from source on Linux.
HBIDE Interface

Using HBIDE for Harbour development.
Sample Harbour App

Running a simple Harbour console application.