Installation

This guide walks you through installing FiveWin for Harbour (FWH) and verifying that your development environment is ready to build Windows applications.

System Requirements

Component Minimum Recommended
Operating System Windows 7 SP1 Windows 10 / 11
Harbour Compiler Harbour 3.2.0 Harbour 3.2.0 (latest nightly)
xHarbour (alternative) xHarbour 1.2.3 xHarbour 1.3+ (latest build)
C Compiler Any one: BCC 5.5+, MSVC 2017+, or MinGW GCC 8+ MSVC 2022 (64-bit)
Disk Space 200 MB 500 MB (with samples and docs)
RAM 2 GB 4 GB+

Installation Flow

flowchart LR A["Download FWH
from fivetech.com"] --> B["Run Installer
or Unzip"] B --> C["Set Environment
Variables"] C --> D["Install Harbour
Compiler"] D --> E["Install C Compiler
(BCC/MSVC/GCC)"] E --> F["Run First
Test Build"] F --> G{"Build OK?"} G -- Yes --> H["Ready to
Develop!"] G -- No --> I["Check Paths
& Libraries"] I --> F

Download and Install

Step 1: Obtain FiveWin

Download the latest FiveWin for Harbour package from fivetech.com. You will receive either a self-extracting installer or a ZIP archive.

Step 2: Install Harbour

If you do not already have Harbour installed, download it from github.com/harbour/core or use a pre-built binary distribution. A typical Harbour installation goes to C:\harbour.

// Verify Harbour is installed:
C:\> harbour --version
Harbour 3.2.0dev (r2104281802)

Step 3: Install a C Compiler

Choose one or more of the following compilers:

Compiler Download Source Typical Path
Borland BCC 5.5 Embarcadero free tools C:\BCC55 or C:\Borland\BCC55
Microsoft Visual C++ Visual Studio Build Tools C:\Program Files\Microsoft Visual Studio\2022
MinGW GCC mingw-w64.org or MSYS2 C:\mingw64 or C:\msys64\mingw64

Step 4: Set Environment Variables

FiveWin build scripts look for certain environment variables. Set them in your system or in a batch file before building:

// Example environment setup (add to your PATH or setenv.bat):
SET FWH=C:\FWH
SET HARBOURDIR=C:\harbour
SET BCCDIR=C:\BCC55
SET PATH=%BCCDIR%\BIN;%HARBOURDIR%\BIN;%PATH%

Directory Structure

After installation, the FWH directory contains these folders:

graph TD ROOT["C:\FWH (root)"] ROOT --> LIB["lib/
Pre-built .lib files
for all compilers"] ROOT --> INC["include/
Header files (.ch)
FiveWin.ch, etc."] ROOT --> SRC["source/
FWH source code
classes/ function/"] ROOT --> SAM["samples/
Example programs
organized by topic"] ROOT --> MAK["makes/
Build scripts for
each compiler"] ROOT --> DOC["docs/
Documentation
HTML reference"] LIB --> L1["FiveH32.lib"] LIB --> L2["FiveHC32.lib"] LIB --> L3["FiveH64.lib"] LIB --> L4["FiveHM32.lib"] LIB --> L5["FiveHG32.lib"] SRC --> SC["source/classes/
TWindow.prg, TDialog.prg..."] SRC --> SF["source/function/
Utility functions"] SRC --> SW["source/winapi/
Win32 API wrappers (C)"] MAK --> M1["makes/hb_bcc32/"] MAK --> M2["makes/hb_msvc64/"] MAK --> M3["makes/hb_gcc64/"]

The lib/ Folder

This folder contains the pre-compiled FiveWin static libraries. Each compiler variant has its own .lib file:

File Compiler Architecture
FiveH32.libBCC 5.x (Borland)32-bit
FiveHM32.libMSVC32-bit
FiveH64.libMSVC64-bit
FiveHG32.libMinGW GCC32-bit
FiveHG64.libMinGW GCC64-bit

The include/ Folder

Header files provide command definitions and constants. The most important include file is FiveWin.ch, which you include at the top of every FWH program:

#include "FiveWin.ch"

Other commonly used headers:

The samples/ Folder

Dozens of ready-to-compile example programs organized by topic. Each sample folder typically contains a .prg file and a build script (b32.bat or b32.bc):

samples/
  +-- ai/            // OpenAI, ChatGPT integration
  +-- misc/          // General-purpose examples
  +-- ui/
  |   +-- xbrowse/   // TXBrowse grid examples
  +-- manus/         // Automation examples

First Compilation Test

The fastest way to verify your installation is to compile one of the bundled sample programs using the provided build script. Navigate to the makes folder for your compiler and run:

// For BCC32 (Borland):
cd C:\FWH\makes\hb_bcc32
go.bat ..\samples\hello.prg

// For MSVC 64-bit:
cd C:\FWH\makes\hb_msvc64
go.bat ..\samples\hello.prg

// For GCC 64-bit:
cd C:\FWH\makes\hb_gcc64
go.bat ..\samples\hello.prg

If the build succeeds, you will see hello.exe in the output folder. Run it and a FiveWin window should appear. If the build fails, check:

Using build_new.bat

FiveWin includes a universal build script build_new.bat that supports all compiler variants from a single command. See the Build System page for full details.

// Quick test with BCC32:
build_new.bat hello.prg hb32

// Quick test with MSVC 64-bit:
build_new.bat hello.prg hm64

Verification Checklist

After installation, verify the following:

Check Command / Action Expected Result
Harbour is in PATH harbour --version Prints version 3.2.0+
C compiler is in PATH bcc32 --version or cl /? Prints compiler info
FWH environment set echo %FWH% Shows FWH root directory
Library file exists Check %FWH%\lib\ Contains FiveH32.lib (or variant)
Sample compiles Build hello.prg Produces hello.exe, runs OK

Troubleshooting

Compiler Not Found

If you get "command not found" errors, ensure the compiler's bin\ directory is in your system PATH. For MSVC, you may need to run from a "Developer Command Prompt" or call vcvarsall.bat first.

Unresolved External Symbols

This usually means the linker cannot find a required library. Ensure you are using the correct FiveWin library for your compiler (e.g., do not use FiveH32.lib with MSVC — use FiveHM32.lib instead).

Header File Not Found

Add the FiveWin include\ folder to your Harbour include path:

harbour myapp.prg -i%FWH%\include -i%HARBOURDIR%\include -n -w

Next Steps