Harbour - xBasians.org

Modern open-source xBase compiler for cross-platform development

!!!website in development!!!

๐Ÿšข Install Harbour

Set up the Harbour compiler on your system. Select your OS for instructions.

Step 1 โ€” Installation
# 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
Harbour Docs
Tip: Ensure $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
Harbour Docs
Note: Use MSYS2 or MinGW-w64 for Windows compilation. Add Harbour's bin folder to PATH.
# 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
Harbour Docs
Tip: Xcode Command Line Tools are required. Run 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.

After installation, add Harbour's bin directory to your PATH and verify with hbmk2 --version.
Continue: Create a Project โ†’

๐Ÿ“ Create Your First Harbour Project

Set up a basic Harbour project structure and compile a simple program.

Step 2 โ€” Project Setup
# 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 Docs
Tip: Use 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.
Run your program to verify setup. Explore hbmk2 options for GUI or advanced builds.
Continue: Resources & Tools โ†’

๐Ÿ› ๏ธ Harbour Resources & Tools

Explore tools, libraries, and community resources for Harbour development.

Step 3 โ€” Ecosystem

Harbour Harbour Core

The core Harbour compiler and runtime libraries.

Harbour HBIDE

Integrated development environment for Harbour projects.

Harbour HMG

GUI library for Harbour, providing native Windows interfaces.

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

Harbour build

Building Harbour from source on Linux.

HBIDE Interface

HBIDE Interface

Using HBIDE for Harbour development.

Sample Harbour App

Harbour App

Running a simple Harbour console application.