- Notifications
You must be signed in to change notification settings - Fork4
Portable, xBase compatible programming language and environment
License
Petewg/harbour-core
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Harbour is the free software implementation of a multi-platform,multi-threading, object-oriented, scriptable programming language,backward compatible with Clipper/xBase. Harbour consists ofa compiler and runtime libraries with multiple UI and databasebackends, its own make system and a large collection of librariesand interfaces to many popular APIs.
- Guarantees and Liability
- How to Participate
- How to Get
- How to Build
- How to Do a Partial Build
- How to Create Distributable Packages
- How to Enable Optional Components
- Build Options
- Build Examples
- Build Your Own Harbour App
- Debugging Options
- Troubleshooting
- Supported Platforms and C Compilers
- Platform Matrix
- External links
- Harbour Links
This document and all other parts of Harbour are distributed in thehope they will be useful, but there is NO GUARANTEE that they arecomplete, accurate, non-infringing or usable for any purpose whatsoever.Contributors are NOT LIABLE for any damages that result from usingHarbour in any ways. For more legal details, seeLICENSE.
If you think you can make Harbour better, start to contribute.SeeHow to Participate.
The information this document is subject to change without noticeand does not represent any future commitment by the participantsof the project.
There are several ways to help making Harbour better:
You can give feedback/suggestions to developers on availablechannels, seeHarbour Links.
Submit a change:
- Fork Harbour
- Create a branch:
git checkout -b my_mod
- Do commit pre-check and new log entry:
hbrun bin/commit
- Commit your changes:
git commit -am "Added my feature"
- Push to the branch:
git push origin my_mod
- Open a Pull Request
Always use the same coding/formatting style as you find inthe files you're modifying. The easiest way to achieve thisis to use these commands to format the sources:
$ uncrustify -c <harbour_dir>/bin/harbour.ucf <source(.c|.h)> $ <harbour_dir>/bin/hbformat <source(.prg|.hb|.ch)>
Text editor setting for Harbour files
- Encoding is either 7-bit ASCII or UTF-8 (withoutBOM)
- 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 thisfree service.
Of course, there is more into Harbour contribution than writingcode, so you're welcome to do so in other areas like documentation,helping fellow users, giving input on decisions, testing invarious environments, volunteering in administration tasks, etc.
Download binary archive from this page and unpack or install:
- http://sourceforge.net/projects/harbour-project/files/
(choose the highest version number)
Download source archive from this page and unpack:
- http://sourceforge.net/projects/harbour-project/files/source/
(choose the highest version number)
WARNING:Recommendedforuserscontributing to Harbour development, following the development mailing list,commits and readingChangeLog.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-core
You can get subsequent updates using this command:
git pull
Download source archive from any of these links and unpack:
- https://github.com/harbour/core/archive/master.zip
- https://github.com/harbour/core/archive/master.tar.gz
Windows (unified):
- http://sourceforge.net/projects/harbour-project/files/binaries-windows/nightly/harbour-nightly-win.exe/download
- http://sourceforge.net/projects/harbour-project/files/binaries-windows/nightly/harbour-nightly-win.7z/download
Before reporting a problem to developers, make sure to readTroubleshooting and try the suggestionsyou 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)
Platform specific prerequisites:
- Windows XP or upper system is recommended to build Harbour.
- Make sure to have your C compiler of choice properly installedin PATH. Refer to your C compiler installation and setupinstructions for details. It's recommended to make sure no toolsin your PATH belonging to other C compilers are interfering withyour setup. It's also highly discouraged to keep multiple copiesof the same compiler, or different versions of the same compilerin PATH at the same time. For the list of supported compilers,look upSupported Platforms and C Compilers.
- GNU Make 3.81 or upper is required. A copy of this toolis included in all Harbour packages, so you don't have to doanything.If you want to get it separately, you can find ithereUnpack 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 seeHello, 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> hello
You should seeHello, world!
on screen.
When building for Borland C++ make sure that GNU Makeis 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 seeHello, world!
on screen.
To build:
> os2-make [install]
To test it, type:
> cd tests> ..\bin\hbmk2 hello.prg> hello
You should seeHello, world!
on screen.
To build:
$ make [install] [HB_PLATFORM=<...>]
To test it, type:
$ cd tests$ hbmk2 hello.prg$ ./hello
You should seeHello, 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$ ./hello
You should seeHello, world!
on screen.
You can override default (host) architecture by addingvalues 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
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 needto do to install bison and gmake is to run the followingcommands, which may require that you run su root first toget 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 seeHello, world!
on screen.
Install GNU make from the Minix pkgsrc repository; for details seehere.
Optionally, GCC may also be installed if you wish to use that insteadof 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$ ./hello
You should seeHello, 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 compilationsystem tools) comebefore the GNU binutils components inyour$PATH
.
If you want to build only a specific part of Harbour, likeone core library or all core libraries, or all contrib packages,you have to do everything the same way as for a full build, theonly difference is that you first have to go into the specificsource directory you want to build. When starting GNU Make,all components under that dir will be built:
cd src/rtl<make> [clean] [install]
If you want to rebuild one specific contrib package, use this:
cd contribhbmk2 make.hb <name> [clean] [custom hbmk2 options]
$ package/mpkg_src.sh
$ export HB_BUILD_PKG=yes$ make clean install
$ fakeroot debian/rules binary
$ 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)--with odbc - build components dependent on odbc (hbodbc, sddodbc)--with pgsql - build components dependent on pgsql (hbpgsql, sddpg)--with localzlib - build local copy of zlib library--with localpcre - build local copy of pcre library--without x11 - do not build components dependent on x11 (gtxwc)--without curses - do not build components dependent on curses (gtcrs)--without slang - do not build components dependent on slang (gtsln)--without gpllib - do not build components dependent on GPL 3rd party code--without gpm - build components without gpm support (gttrm, gtsln, gtcrs)
$ package/mpkg_rpm_win.sh
$ package/mpkg_rpm_wce.sh
$ set HB_DIR_NSIS=%ProgramFiles%\NSIS\$ set HB_DIR_ZIP=C:\info-zip\$ set HB_BUILD_PKG=yes
Then run build as usual withclean install
options.See:How to Build
$ set HB_DIR_ZIP=C:\info-zip\$ set HB_BUILD_PKG=yes
Then run build as usual withclean install
options.See:How to Build
$ package\winuni\mpkg_win_uni.bat
Carefully read in-file instructions and do the necessarysteps before calling the script.
Certain Harbour parts – typically contrib packages – dependon 3rd party components. To make these Harbour parts built,you needto tell Harbour where to find the headers for these 3rd partycomponents.
On *nix systems most of these 3rd party components willautomatically be picked up if installed on well-known standardsystem locations.
You only need to use manual setup if the dependency isn't availableon your platform on a system location, or you wish to usea non-standard location. Typically you need to do this on non-*nix(Windows, MS-DOS, OS/2) systems for all packages and for a few packageson *nix which aren't available through official package managers(f.e. ADS Client).
Note that Harbour is tuned to use 3rd party binary packages in theirdefault, unmodified – "vanilla" – install layout created by theirofficial/mainstream install kits. If you manually move, rename,delete or add files under the 3rd party packages' root directory,the default Harbour build process (especially Windows implibgeneration) might not work as expected.
You can set these environment variables before startingthe build. Make sure to adjust them to your own directories:
HB_WITH_ADS=C:\ads\acesdkHB_WITH_ALLEGRO=C:\allegro\includeHB_WITH_BLAT=C:\blat\full\sourceHB_WITH_BZIP2=C:\bzip2 (defaults to locally hosted version if not found)HB_WITH_CAIRO=C:\cairo\include\cairoHB_WITH_CUPS= (on *nix only)HB_WITH_CURL=C:\curl\includeHB_WITH_CURSES= (on *nix systems and DJGPP, where it's autodetected)HB_WITH_EXPAT=C:\expat\lib (defaults to locally hosted version)HB_WITH_FIREBIRD=C:\Firebird\includeHB_WITH_FREEIMAGE=C:\FreeImage\DistHB_WITH_GD=C:\gd\includeHB_WITH_GPM= (on Linux only)HB_WITH_GS=C:\ghostscript-9.01\psiHB_WITH_GS_BIN=C:\ghostscript-9.01\bin (on Windows)HB_WITH_JPEG=C:\jpeglib (defaults to locally hosted version if not found)HB_WITH_LIBHARU=C:\libharu\include (defaults to locally hosted version)HB_WITH_LIBMAGIC= (currently on *nix systems)HB_WITH_LZF=C:\liblzf (defaults to locally hosted version if not found)HB_WITH_MINILZO=C:\minilzo\ (defaults to locally hosted version if not found)HB_WITH_MINIZIP=C:\zlib\contrib\minizip (defaults to locally hosted version if not found)HB_WITH_MXML=C:\minixml (defaults to locally hosted version if not found)HB_WITH_MYSQL=C:\mysql\includeHB_WITH_OCILIB=C:\ocilib\includeHB_WITH_ODBC= (may only be needed on non-Windows systems)HB_WITH_OPENSSL=C:\openssl\inc32 OR C:\openssl\includeHB_WITH_PCRE=C:\pcre (defaults to locally hosted version if not found)HB_WITH_PGSQL=C:\pgsql\includeHB_WITH_PNG=C:\libpng (defaults to locally hosted version if not found)HB_WITH_QT=C:\Qt\include (version 4.5.0 or upper is required)HB_WITH_SLANG= (on *nix systems)HB_WITH_SQLITE3=C:\sqlite3 (defaults to locally hosted version if not found)HB_WITH_TINYMT=C:\tinymt\tinymt (defaults to locally hosted version)HB_WITH_WATT= (on MS-DOS systems)HB_WITH_X11= (on *nix systems)HB_WITH_XDIFF=C:\libxdiff-0.23\xdiff (defaults to locally hosted version if not found)HB_WITH_ZLIB=C:\zlib (defaults to locally hosted version if not found)
To explicitly disable any given components, use the valueno
.This may be useful to avoid autodetection of installed packageson *nix systems. You may also use the valuelocal
to force using thelocally hosted copy (inside Harbour source repository) of these packages,where applicable.nolocal
will explicitly disable using locally hostedcopy.
You can override autodetection of QT 'moc' tool by using HB_QTPATH andoptionally HB_QTPOSTFIX envvars. This may only be necessary on some *nixsystems. F.e.:
HB_QTPATH=/opt/qt5/bin/HB_QTPOSTFIX=
Certain contribs can be instructed – when using .hbc files – tolink against static build of their 3rd party lib dependencies (foradvanced users only):
HB_STATIC_ALLEGRO=yesHB_STATIC_CURL=yesHB_STATIC_OPENSSL=yes
NOTES:
- you need to use native path format to your shell/OS
- spaces in directory names aren't currently supported(youcan use 8.3 name alias on Windows platform, though)
- don't put directory names inside double quotes
- use absolute paths
InstallHomebrew
Install packages:
$ brew install pcre slang cairo freeimage libgd mysql postgresql qt5 $ brew install upx uncrustify ack optipng jpegoptim
Download and installAdvantage Client Engine API for Linux package(f.e.aceapi-10.00.0.3.tar.gz
)
Download libharu fromhttp://libharu.org/ ->./configure
->make install
You'll need these base packages to build/package/test/use Harbour:
$ sudo apt-get install bash git gcc binutils fakeroot debhelper valgrind upx uncrustify
You'll need these packages to compile certain contribs and optional Harbour features:
for gtcrs terminal lib: $ sudo apt-get install libncurses-dev for gtsln terminal lib: $ sudo apt-get install libslang2-dev OR $ sudo apt-get install libslang1-dev for gtxwc terminal lib: $ sudo apt-get install libx11-dev for console mouse support: $ sudo apt-get install libgpm-dev OR $ sudo apt-get install libgpmg1-dev for contrib/gtalleg lib: $ sudo apt-get install liballegro4.2-dev for contrib/hbcairo lib: $ sudo apt-get install libcairo2-dev for contrib/hbcups lib: $ sudo apt-get install libcups2-dev for contrib/hbcurl lib: $ sudo apt-get install libcurl4-openssl-dev OR $ sudo apt-get install libcurl4-gnutls-dev for contrib/hbfbird lib: $ sudo apt-get install firebird2.1-dev OR $ sudo apt-get install libfirebird2.0-dev for contrib/hbfimage lib: $ sudo apt-get install libfreeimage-dev for contrib/hbgd lib: $ sudo apt-get install libgd2-xpm-dev OR $ sudo apt-get install libgd-xpm-dev for contrib/hbgs lib: $ sudo apt-get install libgs-dev for contrib/hbmagic lib: $ sudo apt-get install libmagic-dev for contrib/hbmysql lib: $ sudo apt-get install libmysqlclient15-dev for contrib/hbodbc lib: $ sudo apt-get install unixodbc-dev for contrib/hbpgsql lib: $ sudo apt-get install libpq-dev for contrib/hbqt lib: $ sudo apt-get install libqt5-dev
Optional, to override locally hosted sources:
for bzip2 support: $ sudo apt-get install libbz2-dev for zlib support: $ sudo apt-get install zlib1g-dev for pcre (regex) support: $ sudo apt-get install libpcre3-dev for contrib/hbsqlit3 lib: $ sudo apt-get install libsqlite3-dev for contrib/hbexpat lib: $ sudo apt-get install libexpat1-dev
You'll need these base packages to build/package/test/use Harbour:
bash git gcc make glibc-devel rpm valgrind upx uncrustify
You'll need these packages to compile certain contribs and optional Harbour features:
for gtcrs terminal lib: ncurses-devel ncurses for gtsln terminal lib: slang-devel slang for gtxwc terminal lib: xorg-x11-devel XFree86-devel for console mouse support: gpm-devel OR gpm for contrib/gtalleg lib: allegro-devel for contrib/hbcairo lib: cairo-devel for contrib/hbcups lib: libcups2-devel for contrib/hbcurl lib: curl-devel for contrib/hbfbird lib: firebird-devel for contrib/hbfimage lib: freeimage-devel for contrib/hbgd lib: gd-devel for contrib/hbmysql lib: libmysqlclient-devel OR mysql-devel OR MySQL-devel for contrib/hbodbc lib: unixodbc-devel OR unixODBC-devel for contrib/hbpgsql lib: postgresql-devel for contrib/hbqt lib: qt5-devel
NOTES:
You can use following commands on different distros to install packages:
openSUSE: $ sudo zypper install Fedora, CentOS: $ sudo yum install Mandriva: $ sudo urpmi
Checkthis for more
On openSUSE, if you want to build 32-bit Harbour on a 64-bit host, installabove packages with
-32bit
appended to their names, f.e.slang-devel-32bit
$ pkg install SUNWgit SUNWgcc SUNWgmake
If you want to use the gtsln library instead of gtstd or gtcrs,then you also need to install libslang. If you installed the portscollection, then all you need to do to install libslang is to runthe following commands, which may require that you run su first toget the correct permissions:
$ cd /usr/ports/devel/libslang$ make$ make install$ make clean
You can fine-tune Harbour builds with below listedenvironment variables. You can add most of these via theGNU Make command line also, usingmake VARNAME=value
syntax.All of these settings are optional and all settings are casesensitive.
HB_INSTALL_PREFIX
Target root directory to install Harbour files.On *nix systems the default is set to
/usr/local/
or$(PREFIX)
if specified, and/usr/local/harbour-<arch>-<comp>
for cross-builds.It's always set to./pkg/<arch>/<comp>
whenHB_BUILD_PKG
is set toyes
. On non-*nix systems,you must set it to a valid directory when usinginstall
. Use absolute paths only. For a peace ofmind, avoid using spaces and quotes in the name.You have to use path format native to your shell.F.e. to specifyC:\dir
on Windows, with Cygwinyou should use/cygdrive/c/dir
, with MSYS/c/dir
.HB_USER_PRGFLAGS
User Harbour compiler optionsHB_USER_CFLAGS
User C compiler optionsHB_USER_RESFLAGS
User resource compiler options (on win, wce, os2)HB_USER_LDFLAGS
User linker options for executablesHB_USER_AFLAGS
User linker options for librariesHB_USER_DFLAGS
User linker options for dynamic libraries
Set these only if autodetection doesn't suit your purpose:
HB_PLATFORM
Override platform autodetectionHB_COMPILER
Override C compiler autodetectionSee this for possible values:Supported Platforms and C CompilersSee also:
HB_CC*
settings.
HB_BUILD_NAME=[<name>]
Create named build. This allows to keep multiple builds in parallel for anygiven platform/compiler. F.e. debug / release.
In current implementation it's appended to compiler directory name, soall filesystem/platform name rules and limits apply. (Back)slashes will bestripped from the name though.
HB_BUILD_PKG=yes
Create release package. Default:
no
Requiresclean install
in root source dir.HB_BUILD_DYN=no
Create Harbour dynamic libraries. Default:
yes
HB_BUILD_CONTRIB_DYN=no
Create contrib dynamic libraries. Default:
yes
HB_BUILD_SHARED=yes
Create Harbour executables in shared mode.Default:
yes
whenHB_INSTALL_PREFIX
pointsto a *nix system location, otherwiseno
.HB_BUILD_DEBUG=yes
Create a debug build. Default:
no
HB_BUILD_STRIP=[all|bin|lib|no]
Strip symbols and debug information from binaries.Default:
no
HB_BUILD_OPTIM=no
Enable C compiler optimizations. Default:
yes
HB_BUILD_MODE=[cpp|c]
Change default build mode to C++ or C.Default:
c
, except for msvc* compilers, where it'scpp
.HB_BUILD_PARTS=[all|compiler|lib]
Build only specific part of Harbour.
HB_BUILD_NOGPLLIB=yes
Disable components dependent on GPL 3rd party code,to allow Harbour for commercial (closed source)projects. Default:
no
HB_BUILD_3RDEXT=no
Enable autodetection of 3rd party componentson default system locations. Default:
yes
HB_BUILD_CONTRIBS=no [<l>]
Don't build any, or space separated
<l>
list of,contrib packages. Please note it won't preventbuilding packages which are dependencies ofother – enabled – packages.HB_BUILD_CONTRIBS=[<l>]
Build space separated
<l>
list of contriblibraries. Build all if left empty (default).HB_BUILD_ADDONS=<l>
Build space separated list of additional .hbpprojects.
HB_COMPILER_VER=[<ver>]
Set C compiler version. This is used with win/msvc,win/mingw and cygwin/gcc targets currently.
<ver>
format:<15><0>[<0>] = <major><minor>[.<revision>]
Default: filled by compiler autodetection or empty
HB_USER_LIBS=[<list>]
Add space separated
<list>
of libs to link process.Lib names should be without extension and path.You only need this in special cases, like CodeGuardbuild with win/bcc.HB_INSTALL_IMPLIB=no
Copy import libraries created for external .dlldependencies to the library install directory in
install
build phase. Default:yes
For Windows/OS/2 targets only. Please notethat this feature doesn't work with all possiblebinary distributions of 3rd party packages.We test only the official/mainstream ones. Alsonote that the generated implibs will require .dllscompatible with the ones used at build time.HB_INSTALL_3RDDYN=yes
Copy dynamic libraries of external .dll dependenciesto the dynamic library directory in
install
buildphase. Default: noHB_SRC_ROOTPATH=<dir>
When using GNU Make older than 3.81, you shall setthe root directory of Harbour source tree as anabsolute path. If not set, some build functionalitymay fail, like detection of 3rd party packages withlocally hosted sources.With newer make versions, this variable is ignored.
HB_REBUILD_EXTERN=yes
Rebuild extern headers. This is typically used bydevelopers after code modifications or beforerelease. Default: no
HB_REBUILD_PARSER=yes
Rebuild language parser sources. Typicallyyou only need this if your are Harbour coredeveloper modifying grammar rules (.y).Requires GNU Bison 1.28 or upper in PATH.Default: no
HB_CCPATH=[<dir>/]
Used with non-*nix gcc family compilers (andsunpro) to specify path to compiler/linker/archivetool to help them run from *nix hosts as cross-buildtools. Ending slash must be added.
HB_CCPREFIX=[<prefix>]
Used with gcc compiler family to specifycompiler/linker/archive tool name prefix.
HB_CCSUFFIX=[<suffix>]
Used with gcc compiler family to specifycompiler/linker tool name suffix – usuallyversion number.
You can build Harbour for target platforms different than hostplatform. F.e. you can create Windows build on *nix systems, Linuxbuilds on Windows systems, etc. It's also possible to build targetsfor different than host CPU architectures. F.e. you can createWindows 64-bit build on 32-bit Windows platform, or Linux x86-64build on x86 hosts, or Linux MIPS build on x86 host, etc.
Point this envvar to the directory where native Harbour executablesfor your host platform can be found:
HB_HOST_BIN=<harbour_native_build_dir>\bin
If you leave this value empty, the make system will try to autodetect it,so in practice all you have to do is to create a native build first (noinstall
required), then create the cross-build. If you set this valuemanually, it may be useful to know that harbour, hbpp and hbmk2executables are required for a cross-build process to succeed.
NOTES:
- All code below should be copied to batch files or typed at commandline.
- Naturally, you'll need to adapt dirs to valid ones on your system.Don't use spaces in dirs.
- You can use additional
clean
,install
orclean install
make parameters depending on what you want to do.- To redirect all output to a log file, append this after the makecommand:
> log.txt 2>&1
rem MSVC 2012call"%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"win-make
rem MSVC 2012 for Windows x86-64rem (requires preceding build for native target)call"%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86_amd64win-make
rem MSVC 2010 and Windows SDK 7.1call"%ProgramFiles%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"win-make
rem MSVC 2010 (Professional or above) and Windows SDK 7.1 for Windows x86-64rem (requires preceding build for native target)call"%ProgramFiles%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86_amd64win-make
rem Windows SDK 7call"%ProgramFiles%\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"win-make
rem Windows SDK 7 for Windows x86-64rem (requires preceding build for native target)call"%ProgramFiles%\Microsoft Visual Studio 9.0\VC\bin\vcvarsx86_amd64.bat"win-make
rem MSVC 2008 + SDKsetWindowsSDKDir=%ProgramFiles%\Microsoft SDKs\Windows\v6.0A\call"%ProgramFiles%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"win-make
rem MSVC 2008call"%ProgramFiles%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"win-make
rem MSVC 2008 (Standard or above) for Windows x86-64rem (requires preceding build for native target)call"%ProgramFiles%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_amd64win-make
rem MSVC 2008 (Team Suite) for Windows IA-64 Itaniumrem (requires preceding build for native target)call"%ProgramFiles%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_ia64win-make
rem MSVC 2008 for Windows CE ARMrem (requires preceding build for native target)setINCLUDE=%ProgramFiles%\Microsoft Visual Studio 9.0\VC\ce\include;%ProgramFiles%\Windows Mobile 5.0 SDK R2\PocketPC\Include\Armv4isetLIB=%ProgramFiles%\Microsoft Visual Studio 9.0\VC\ce\lib\armv4i;%ProgramFiles%\Windows Mobile 5.0 SDK R2\PocketPC\Lib\ARMV4IsetPATH=%ProgramFiles%\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm;%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE;%PATH%win-make
rem MSVC 2005call"%ProgramFiles%\Microsoft Visual Studio 8\VC\vcvarsall.bat"win-make
rem MSVC 2005 for Windows CE ARMrem (requires preceding build for native target)setINCLUDE=%ProgramFiles%\Microsoft Visual Studio 8\VC\ce\include;%ProgramFiles%\Windows Mobile 5.0 SDK R2\PocketPC\Include\Armv4isetLIB=%ProgramFiles%\Microsoft Visual Studio 8\VC\ce\lib\armv4i;%ProgramFiles%\Windows Mobile 5.0 SDK R2\PocketPC\Lib\ARMV4IsetPATH=%ProgramFiles%\Microsoft Visual Studio 8\VC\ce\bin\x86_arm;%ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE;%PATH%win-make
rem MSVC .NET 2003 (untested)call"%ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\vcvarsall.bat"win-make
rem MinGW GCCsetPATH=C:\mingw\bin;%PATH%win-make
rem MinGW GCC using MSYS shellsetPATH=C:\msys\1.0.11\bin;C:\mingw\bin;%PATH%sh -c make
rem MinGW GCC for Windows x86-64rem (requires preceding build for native target)setPATH=C:\mingw64\bin;%PATH%win-make
rem MinGW GCC for Windows CE ARMrem (requires Cygwin + preceding build for native target)setPATH=C:\mingwce\opt\mingw32ce\bin;C:\cygwin\bin;%PATH%rem optional:setCYGWIN=nodosfilewarningwin-make
rem Intel(R) C++call"%ProgramFiles%\Intel\Compiler\C++\10.1.014\IA32\Bin\iclvars.bat"win-make
rem Intel(R) C++ for Windows IA-64 Itaniumrem (requires preceding build for native target)call"%ProgramFiles%\Intel\Compiler\C++\10.1.025\Itanium\Bin\iclvars.bat"win-make
rem Borland C++ 5.5.1setPATH=C:\Borland\BCC55\Bin;%PATH%win-make
rem Pelles CsetPATH=%ProgramFiles%\PellesC\Bin;%PATH%setINCLUDE=%ProgramFiles%\PellesC\Include;%ProgramFiles%\PellesC\Include\Win;%INCLUDE%setLIB=%ProgramFiles%\PellesC\Lib;%ProgramFiles%\PellesC\Lib\Win;%LIB%win-make
rem Pelles C for Windows x86-64rem (requires preceding build for native target)setPATH=%ProgramFiles%\PellesC\Bin;%PATH%setINCLUDE=%ProgramFiles%\PellesC\Include;%ProgramFiles%\PellesC\Include\Win;%INCLUDE%setLIB=%ProgramFiles%\PellesC\Lib;%ProgramFiles%\PellesC\Lib\Win64;%LIB%win-make
rem Pelles C for Windows CE ARMrem (requires preceding build for native target)setPATH=%ProgramFiles%\PellesC\Bin;%PATH%setINCLUDE=%ProgramFiles%\PellesC\Include\WinCE;%ProgramFiles%\PellesC\Include;%INCLUDE%setLIB=%ProgramFiles%\PellesC\Lib;%ProgramFiles%\PellesC\Lib\WinCE;%LIB%win-make
rem Delorie GNU C for MS-DOS (on Intel 32-bit Windows hosts only)setDJGPP=C:\djgpp\djgpp.envsetPATH=C:\djgpp\bin;%PATH%win-make
rem Open Watcom C/C++SETWATCOM=C:\watcomSETPATH=%WATCOM%\BINNT;%WATCOM%\BINW;%PATH%SETEDPATH=%WATCOM%\EDDATSETINCLUDE=%WATCOM%\H;%WATCOM%\H\NTwin-make
rem Open Watcom C/C++ for MS-DOSSETWATCOM=C:\watcomSETPATH=%WATCOM%\BINNT;%PATH%SETEDPATH=%WATCOM%\EDDATSETINCLUDE=%WATCOM%\Hwin-make
rem Open Watcom C/C++ for OS/2rem (requires preceding build for Windows target)SETWATCOM=C:\watcomSETPATH=%WATCOM%\BINNT;%WATCOM%\BINW;%PATH%SETBEGINLIBPATH=%WATCOM%\BINP\DLLSETEDPATH=%WATCOM%\EDDATSETINCLUDE=%WATCOM%\H;%WATCOM%\H\OS2win-make
rem Open Watcom C/C++ for Linuxrem (requires preceding build for Windows target)SETWATCOM=C:\watcomSETPATH=%WATCOM%\BINNT;%WATCOM%\BINW;%PATH%SETEDPATH=%WATCOM%\EDDATSETINCLUDE=%WATCOM%\LHwin-make
rem VxWorks GCC x86rem (requires preceding build for Windows target)wrenv -p vxworks-6.8setHB_COMPILER=gccwin-make
rem VxWorks GCC ARMrem (requires preceding build for Windows target)wrenv -p vxworks-6.8setHB_COMPILER=gccsetHB_CPU=armsetHB_BUILD_NAME=armwin-make
rem VxWorks Wind River Compiler x86rem (requires preceding build for Windows target)wrenv -p vxworks-6.8setHB_COMPILER=diabwin-make
rem Symbian OSrem (requires preceding build for Windows target)setPATH=C:\Symbian\CSL Arm Toolchain\bin;%PATH%setHB_PLATFORM=symbiansetHB_COMPILER=gccsetHB_CCPREFIX=arm-none-symbianelf-setHB_USER_CFLAGS=-IC:\Symbian\SDK\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\stdapis -IC:\Symbian\SDK\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include -D__GCC32__ -D__SYMBIAN32__win-make
rem Cygwin GCC using Cygwin shellsetPATH=C:\cygwin\binsh -c make
rem Add these *before* above sample scripts to configure 3rd party dependencies.rem When using MSYS or Cygwin shell you'll have to use forward slashes andrem also Cygwin drive notation for Cygwin.setHB_WITH_ADS=C:\ads\acesdksetHB_WITH_ALLEGRO=C:\allegro\includesetHB_WITH_BLAT=C:\blat\full\sourcesetHB_WITH_CAIRO=C:\cairo\include\cairosetHB_WITH_CURL=C:\curl\includesetHB_WITH_FIREBIRD=C:\Firebird\includesetHB_WITH_FREEIMAGE=C:\FreeImage\DistsetHB_WITH_GD=C:\gd\includesetHB_WITH_MYSQL=C:\mysql\includesetHB_WITH_OCILIB=C:\ocilib\includesetHB_WITH_OPENSSL=C:\openssl\inc32setHB_WITH_PGSQL=C:\pgsql\includesetHB_WITH_QT=C:\Qt\include
Same as 32-bit Windows, but, you'll have to change%ProgramFiles%
to%ProgramFiles(x86)%
for 32-bit and mixed tools, you can build forboth x86 and x64 without building a native target first, and potentialdifferences with some compilers in using native binaries ifthey are available.
rem MinGW GCC for Windows x86-64setPATH=C:\mingw64\bin;%PATH%win-make
rem MSVC 2012 for Windows x86call"%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"win-make
rem MSVC 2012 for Windows x86-64rem (requires preceding build for native target)call"%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86_amd64win-make
rem MSVC 2010 and Windows SDK 7.1 for Windows x86call"%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"win-make
rem MSVC 2010 (Professional or above) and Windows SDK 7.1 for Windows x86-64call"%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64win-make
rem Windows SDK 7 for Windows x86call"%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"win-make
rem Windows SDK 7 for Windows x86-64call"%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat"win-make
rem MSVC 2008 for Windows x86call"%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"win-make
rem MSVC 2008 (Standard or above) for Windows x86-64call"%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" amd64win-make
rem MSVC 2008 (Team Suite) for Windows IA-64 Itaniumrem (requires preceding build for native target)call"%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_ia64win-make
rem MSVC 2022 targeting ARM64rem (requires preceding build for native target)call"%ProgramFiles(x86)%\Microsoft Visual Studio 17.10\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64win-make
rem Clang distributed by Visual StudiosetPATH="%ProgramFiles(x86)%\Microsoft Visual Studio 17.10\BuildTools\VC\Tools\Llvm\x64\bin";%PATH%win-make
rem Clang from winlibs.comsetPATH=C:\winlibs\mingw64\bin;%PATH%setHB_COMPILER=clangwin-make
rem Clang x86_64 distributed by MSYS2 from cmdsetPATH=C:\msys64\clang64\bin;%PATH%win-make
rem MSVC 2022 for ARM64call"%ProgramFiles(x86)%\Microsoft Visual Studio 17.10\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" arm64rem set HB_COMPILER=msvcarm64 (may be needed if Clang is also in resulting PATH)win-make
rem Clang/MS ARM64setPATH=%ProgramFiles%\Microsoft Visual Studio 17.10\BuildTools\VC\Tools\Llvm\ARM64\bin;%PATH%win-make
rem Clang/MSYS ARM64 called from cmdsetPATH=C:\msys64\clangarm64\bin;%PATH%win-make
rem Delorie GNU CsetDJGPP=C:\djgpp\djgpp.envsetPATH=C:\djgpp\bin;%PATH%dos-make
rem Open Watcom C/C++SETWATCOM=C:\watcomSETPATH=%WATCOM%\BINW;%PATH%SETEDPATH=%WATCOM%\EDDATSETINCLUDE=%WATCOM%\Hdos-make
rem Add these *before* above sample scripts to configure 3rd party dependencies.rem You have to use 8.3 path notation.setHB_WITH_ALLEGRO=C:\ALLEGR~1.2\includesetHB_WITH_FIREBIRD=C:\FIREBI~1.4\includesetHB_WITH_GD=C:\GD-20~1.34\includesetHB_WITH_MYSQL=C:\MYSQL-~1.67\includesetHB_WITH_PGSQL=C:\PGSQL-~1.3\includesetHB_WITH_WATT=C:\WATT\inc
rem GCC 3.3.4 and GCC 3.3.5C:\usr\bin\gccenv.cmdos2-make
rem GCC 4.xC:\usr\local433\gcc440.cmdsetHB_COMPILER=gccomfos2-make
rem Open Watcom C/C++SETWATCOM=C:\watcomSETPATH=%WATCOM%\BINP;%WATCOM%\BINW;%PATH%SETBEGINLIBPATH=%WATCOM%\BINP\DLLSETEDPATH=%WATCOM%\EDDATSETINCLUDE=%WATCOM%\H;%WATCOM%\H\OS2SETHELP=%WATCOM%\BINP\HELP;%HELP%SETBOOKSHELF=%WATCOM%\BINP\HELP;%BOOKSHELF%os2-make
# Open Watcom C/C++ for OS/2# (requires preceding build for Linux target)export WATCOM="/opt/lng/watcom"export INCLUDE="${WATCOM}/h:${WATCOM}/h/os2"export PATH="${WATCOM}/binl:$PATH"export HB_BUILD_3RDEXT=nomake"$@"
# Borland C++ 5.5.1export PATH=~/.wine/drive_c/Borland/BCC55/Bin:$PATHexport HB_PLATFORM=winexport HB_COMPILER=bccexport HB_BUILD_3RDEXT=nomake
# To create "Universal" binaries, compatible with pre-Snow Leopard PowerPC and Intel systemsexport HB_USER_LDFLAGS="-arch i386 -arch ppc"export HB_USER_CFLAGS="$HB_USER_LDFLAGS"export HB_COMPILER=gccmake
[g]make
# MinGW GCC for Windows x86[g]make HB_PLATFORM=win
# MinGW GCC for Windows CE ARM[g]make HB_PLATFORM=wce
For all platforms you'll need two things:
Harbour binaries
Either a Harbour binary distribution or a local Harbourbuild will be okay. If you're reading this text, it'svery likely you have one of these already.
Supported ANSI C compiler
Your compiler of choice has to be placed in the PATH – andconfigured appropriately according to instructions.If you use official Harbour binary distribution on Windows,you already have MinGW compiler embedded in the installation,which will automatically be used, so you don't have tomake any extra steps here.
Use hbmk2 to build your app from source. It's recommended to putit in the PATH (f.e. by usingset PATH=C:\harbour\bin;%PATH%
on Windows).
See hbmk2documentation, with examples.
Build Harbour with:
HB_BUILD_DEBUG=yes
Run app with:
HB_TR_LEVEL=debug# to override default stderr output:HB_TR_OUTPUT=<filename># to enable additional system specific logging output,# OutputDebugString() on Windows, syslog() on *nix systems:HB_TR_SYSOUT=yes
Build Harbour with:
HB_USER_CFLAGS=-DHB_FM_STATISTICS
Build Harbour with:
HB_BUILD_DEBUG=yes
Build app with:
$ hbmk2 myapp -debug
Run app with:
$ valgrind --tool=memcheck --leak-check=yes --num-callers=16 -v ./myapp 2> myapp.log
Build Harbour with:
HB_USER_CFLAGS=-vGHB_USER_LIBS=cg32
Build app with:
$ hbmk2 myapp -b -run
or run script with:
$ hbrun myapp --hb:debug
Press<Alt+D>
in the app.
Always evaluate these points before reporting an issue on the developers'mailing list.
Make sure to have carefully read this document.
Make sure to do a
make clean
before doing a build after refreshingthe sources.If that still fails, make sure to install fresh source tree in a newlocal directory and start over. SeeHow to Getfor instructions to get the source.In case you installed Harbour into system locations (this used to bethe case with some *nix users, albeit mostly completely unnecessarilyor wrongly - f.e. for unstable versions), you will need to remembercleaning off Harbour from all of these locations, too.Advice: Never install unstable Harbour versions to system locations.
If you are doing a cross-build, make sure to have rebuilt the nativeHarbour executables for your host platform. See
HB_HOST_BIN
build messages to find their location.Keep your PATH clean from old, mixed compiler tools or other Harbourversions when building Harbour. The surest way to achieve this is toleave only C compiler directory in PATH:
set PATH=C:\<c_compiler_bin_dir>
If you use Harbour official binary distro on Windows, even above isunnecessary and not recommended.
Remove all old, unnecessary environment variables (for both Harbourand C compiler) from your environment. Also remove any custom settingsfor your C compiler.Use only those documented in this file.Follows some environment variable settings which are commonly believedby users to be useful, but which in reality are either not needed ornot even used by Harbour build process and hbmk2.
Remove any Harbour build settings documented inBuild Options.
Try to do no or only small modifications at once to examplesincluded inBuild Examples.If it doesn't work, fall back to documented examplesas is.
If everything fails and you are to report a build problem to Harbourdevelopers, make sure to include your OS version/language/CPU architecture,Harbour revision, C compiler name/release and version, environmentvariables and verbose log output containingboth stderr and stdout inone combined stream (use
make > log.txt 2>&1
). Enable verbosemode usingHB_BUILD_VERBOSE=yes
.Complete log output is rarely necessary, but always make sure to includethe top of the output (lines starting with!
) and the area whereproblematic behavior occurredfirst. Make sure to not only includea link failure or a make tool failure, as it's most of the time notenough information. Compress your log using zip if it is largerthan 25KB. (use the extension.zip
)With these, you have much better chance to get useful or any response.Do not alter the directory layout and files in Harbour and 3rd partypackages.
If you are to report a build problem with a Harbour application,all of the above points apply, plus make sure to use
-trace
command line option when running hbmk2 and redirect the result toa file (see above how).It's good idea to first remove all manual references to Harbourcore components from makefiles and custom environment. F.e. it'scommom mistake to add C compiler header and/or lib dirs, Harbour coreheader and/or lib dirs, built-in constants to makefiles or environment.No such thing is necessary as all of these are automatically handledby hbmk2. IOW start simple and don't be overbusy withfine-tuningyour configuration. If you need to, the problem is most probablyelsewhere. It's also good idea to try with Harbour nightly binary orofficial stable release first.If you are to report a problem with Harbour itself, always provideself-contained, minimal source code example. Do not use xhb contriblibrary, or any 3rd party Harbour libraries. The example shall reproducethe problem using official stable or nightly Harbour build.Do not post executables and other binary files. If your source containsnon-ASCII (national, accented, special) chars, clearly mark thecodepage/encoding used (UTF-8 recommended) and attach the filescompressed with zip. (use the extension
.zip
)
See more on self-contained examples:http://sscce.org/If your example involves compatibility components, make sure to testit against original implementation (for example, test legacy Clippercore language elements against real CA-Clipper 5.2e or 5.3b, or hbctfunctions against CT3 library, etc)
- linux - Linux
- darwin - OS X
- bsd - FreeBSD / OpenBSD / NetBSD / DragonFly BSD / *BSD
- beos - BeOS / Haiku
- hpux - HP-UX
- sunos - Sun Solaris / OpenSolaris
- qnx - QNX
- android - Android
- vxworks - VxWorks
- symbian - Symbian OS (experimental)
- minix - Minix 3 (tested on 3.2.1; earlier releases won't work)
- aix - IBM AIX
- win - MS Windows (all flavors)(seeExternal links for Win9x requirements)
- wce - MS Windows CE
- dos - MS-DOS (32-bit protected mode only)(MS-DOS compatible systems also work, like dosemu)
- os2 - OS/2 Warp 4 / eComStation
- gcc - GNU C
- clang - Clang
- watcom - Open Watcom C/C++
- icc - Intel(R) C/C++
- sunpro - Sun Studio C/C++
- open64 - Open64 C/C++
- gcc - GNU C
- clang - Clang
- icc - Intel(R) C/C++
- gcc - GNU C
- clang - Clang
- pcc - Portable C Compiler (experimental)
- gcc - GNU C
- gcc - GNU C
- gcc - GNU C
- gcc - GNU C x86
- gccarm - GNU C ARM
- gcc - GNU C
- diab - Wind River Compiler
- gcc - GNU C
- clang - Clang
- gcc - GNU C
- gcc - GNU C
- gcc - GNU C
- gcc - GNU C
- sunpro - Sun Studio C/C++
- mingw - MinGW GNU C 3.4.2 and above
- mingw64 - MinGW GNU C x86-64
- msvc - Microsoft Visual C++
- msvc64 - Microsoft Visual C++ x86-64
- msvcarm - Microsoft Visual C++ ARM
- msvcarm64 - Microsoft Visual C++ ARM64
- msvcia64 - Microsoft Visual C++ IA-64 (Itanium)
- clang - Clang (various flavours supported)
- watcom - Open Watcom C/C++
- bcc - Borland/CodeGear/Embarcadero C++ 4.x and above
- bcc64 - Embarcadero C++ 6.5 and above
- icc - Intel(R) C/C++
- iccia64 - Intel(R) C/C++ IA-64 (Itanium)
- pocc - Pelles C 4.5 and above
- pocc64 - Pelles C x86-64 5.0 and above
- xcc - Pelles C for xhb
- mingw - MinGW GNU C x86
- mingwarm - MinGW GNU C ARM (CEGCC 0.55 and above)
- msvcarm - Microsoft Visual C++ ARM
- poccarm - Pelles C ARM 5.0 and above
- djgpp - Delorie GNU C
- watcom - Open Watcom C/C++
- gcc - EMX GNU C 3.3.5 or lower
- gccomf - EMX GNU C 3.3.5 or upper
- watcom - Open Watcom C/C++
host platform | target platform/compiler | target cpu |
---|
| win | win/bcc | x86 | win | win/bcc64 | x86-64 | win | win/clang | (CPU cross-builds possible: x86, x86-64, arm64) | win | win/gcc | x86 | win | win/global | x86 | win | win/icc | x86 | win | win/icc64 | x86-64 (not supported yet) | win | win/iccia64 | ia64 | win | win/mingw | x86 | win | win/mingw64 | x86-64 | win | win/msvc | x86 | win | win/msvc64 | x86-64 | win | win/msvcarm | arm | win | win/msvcarm64 | arm64 | win | win/msvcia64 | ia64 | win | win/pocc | x86 | win | win/pocc64 | x86-64 | win | win/watcom | x86 | win | win/xcc | x86 x | win | wce/mingwarm | arm x | win | wce/mingw | x86 (not fully supported yet) x | win | wce/poccarm | arm x | win | wce/msvcarm | arm x | win | wce/msvcmips | mips (not supported yet) x | win | wce/msvcsh | sh (not supported yet) x | win | wce/msvc | x86 (not supported yet) x | win | dos/djgpp | x86 (on Windows x86 hosts only) x | win | dos/watcom | x86 x | win | os2/watcom | x86 x | win | linux/watcom | x86 x | win | android/gcc | x86 x | win | android/gccarm | arm x | win | vxworks/gcc | (CPU cross-builds possible: x86, arm, mips, ppc) x | win | vxworks/diab | (CPU cross-builds possible: x86, arm, mips, ppc, sparc) x | win | symbian/gcc | arm x | win | cygwin/gcc | x86 | dos | dos/djgpp | x86 | dos | dos/watcom | x86 x | dos | win/watcom | x86 x | dos | os2/watcom | x86 x | dos | linux/watcom | x86 | os2 | os2/gcc | x86 | os2 | os2/watcom | x86 x | os2 | win/watcom | x86 x | os2 | dos/watcom | x86 x | os2 | linux/watcom | x86 | linux | linux/gcc | (CPU cross-builds possible) | linux | linux/clang | (CPU cross-builds possible) | linux | linux/icc | (CPU cross-builds possible: x86, x86-64, ia64) | linux | linux/sunpro | (CPU cross-builds possible: x86, x86-64) | linux | linux/open64 | (CPU cross-builds possible: x86-64, ia64, ...) x | linux | wce/mingwarm | arm x | linux | wce/mingw | x86 x | linux | win/mingw | x86 x | linux | win/mingw64 | x86-64 x | linux | win/watcom | x86 x | linux | win/bcc | x86 (requires WINE) x | linux | win/bcc64 | x86-64 (requires WINE) x | linux | os2/watcom | x86 x | linux | dos/watcom | x86 x | linux | dos/djgpp | x86 x | linux | android/gcc | x86 x | linux | android/gccarm | arm x | linux | vxworks/gcc | (CPU cross-builds possible: x86, arm, mips, ppc) x | linux | vxworks/diab | (CPU cross-builds possible: x86, arm, mips, ppc, sparc) | bsd | bsd/gcc | (CPU cross-builds possible) | bsd | bsd/clang | (CPU cross-builds possible) | bsd | bsd/pcc | (experimental) x | bsd | wce/mingwarm | arm x | bsd | wce/mingw | x86 x | bsd | win/mingw | x86 x | bsd | dos/djgpp | x86 | darwin | darwin/clang | (CPU cross-builds possible: x86, x86-64, unibin) | darwin | darwin/gcc | (CPU cross-builds possible: x86, x86-64, ppc, ppc64, unibin) | darwin | darwin/icc | (CPU cross-builds possible: x86, x86-64) x | darwin | wce/mingwarm | arm x | darwin | wce/mingw | x86 x | darwin | win/mingw | x86 x | darwin | win/mingw64 | x86-64 x | darwin | dos/djgpp | x86 x | darwin | android/gcc | x86 x | darwin | android/gccarm | arm | hpux | hpux/gcc | (CPU cross-builds possible) | qnx | qnx/gcc | (CPU cross-builds possible - no tested) | beos | beos/gcc | x86 x | hpux | wce/mingwarm | arm x | hpux | wce/mingw | x86 x | hpux | win/mingw | x86 x | hpux | dos/djgpp | x86 | minix | minix/clang | x86 | minix | minix/gcc | x86 | aix | aix/gcc | (CPU cross-builds possible: ppc, ppc64) | sunos | sunos/gcc | (CPU cross-builds possible) | sunos | sunos/sunpro | (CPU cross-builds possible: x86, x86-64, sparc32, sparc64) x | sunos | wce/mingwarm | arm x | sunos | wce/mingw | x86 x | sunos | win/mingw | x86 x | sunos | dos/djgpp | x86 x | sunos | vxworks/gcc | (CPU cross-builds possible: x86, arm, mips, ppc) x | sunos | vxworks/diab | (CPU cross-builds possible: x86, arm, mips, ppc, sparc)
Leadingx marks cross-platform scenarios.
Supported shells per host platforms:
- win / NT shell (cmd.exe)
- win / POSIX shell (MSYS or Cygwin sh.exe)
- win / MS-DOS shell (command.com)
- dos / MS-DOS shell (command.com)
- dos / POSIX shell (bash.exe)
- os/2 / OS/2 shell (cmd.exe)
- os/2 / POSIX shell (bash.exe)
- *nix / POSIX shell
C/C++ Compilers/Shells:
- MinGW/MinGW-64 [win, *nix, free, open-source]
- http://sourceforge.net/projects/mingwbuilds/ (unofficial, recommended)
- http://tdm-gcc.tdragon.net/,http://sourceforge.net/projects/tdm-gcc/ (unofficial) [NOTE: 4.5.1 is broken, 4.5.2, 4.6.1 x86 OK, for x64 use the official release]
- http://www.mingw.org/,http://sourceforge.net/projects/mingw/ (official 32-bit, MSYS home, broken as of 4.5.0-1)
- http://mingw-w64.sourceforge.net/,http://sourceforge.net/projects/mingw-w64/ (official 64-bit, MSYS home)
- http://nuwen.net/mingw.html (unofficial)
- MinGW CEGCC [win, *nix, free, open-source]
- Cygwin [win, free, open-source]
- OS/2 GCC [os2, free, open-source]
- ftp://ftp.netlabs.org/pub/gcc/
- ftp://ftp.netlabs.org/pub/gcc/GCC-3.3.5-csd3.zip
- ftp://ftp.netlabs.org/pub/gcc/libc-0_6_3-csd3.exe
- http://os2ports.smedley.info/index.php?page=gcc
- http://os2ports.smedley.info/index.php?page=gcc44
- http://download.smedley.info/gcc-4.4.5-os2-20101004.zip
- https://dl.dropboxusercontent.com/u/76425158/gcc-4.5.4-os2-20130803.zip
- DJGPP [dos, *nix, free, open-source]
- Open Watcom [win, dos, os2, linux, free, open-source]
- Xcode / Command Line Tools for Xcode [darwin, free, hybrid-source]
- MS Windows SDK [win, free, closed-source]
- http://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx(7.0 and above contains compilers for x86, x86_64 and IA-64)
- MS Windows Mobile SDK [wce, free]
- MS Visual Studio Express [win, free, closed-source]
- MS Visual Studio [win, commercial, closed-source]
- Pelles C [win, wce, free, closed-source]
- Borland/CodeGear/Embarcadero Compiler [win, free, closed-source]
- Intel Compiler [win, linux, darwin, commercial, closed-source]
- MinGW/MinGW-64 [win, *nix, free, open-source]
Libraries:
HB_WITH_ADS - Advantage Client Engine API [win, linux, free, closed-source]
HB_WITH_ALLEGRO - Allegro (GUI) [multiplatform, free, open-source]
HB_WITH_BLAT - Blat (SMTP client) [win, free, open-source]
HB_WITH_BZIP2 - libbzip2 [multiplatform, free, open-source]
HB_WITH_CAIRO - Cairo [multiplatform, open-source]
- https://www.gtk.org/download/windows.php
GTK for Windows has a side effect of including a build of Cairo libs.After installation look for: libcairo-.dll, libpng.dll, zlib*.dll
- https://www.gtk.org/download/windows.php
HB_WITH_CUPS - libcups (printing) [*nix, free, open-source]
HB_WITH_CURL - libcurl (file transfer) [multiplatform, free, open-source]
HB_WITH_EXPAT - Expat (XML parser) [multiplatform, free, open-source]
HB_WITH_FIREBIRD - firebird SQL [multiplatform, free, open-source]
HB_WITH_FREEIMAGE - FreeImage [multiplatform, free, open-source]
HB_WITH_GD - GD Graphics Library [multiplatform, free, open-source]
HB_WITH_GS - Ghostscript [multiplatform, free, open-source]
HB_WITH_JPEG - jpeglib [multiplatform, free, open-source]
HB_WITH_LIBHARU - libharu (PDF creation) [multiplatform, free, open-source]
HB_WITH_LIBMAGIC - libmagic, file recognition [multiplatform, free, open-source]
- ftp://ftp.astron.com/pub/file/
HB_WITH_LZF - lzf library (RT data compression) [multiplatform, free, open-source]
HB_WITH_MINILZO - miniLZO library (RT data compression) [multiplatform, free, open-source]
HB_WITH_MINIZIP - minizip library [multiplatform, free, open-source]
HB_WITH_MXML - miniXML library (small XML library) [multiplatform, free, open-source]
HB_WITH_MYSQL - MySQL [multiplatform, free, open-source]
HB_WITH_OCILIB - OCILIB (C Driver for Oracle) [multiplatform, free, open-source]
HB_WITH_OPENSSL - OpenSSL [multiplatform, free, open-source]
HB_WITH_PCRE - Perl Compatible Regular Expressions [multiplatform, free, open-source]
HB_WITH_PGSQL - PostgreSQL [multiplatform, free, open-source]
HB_WITH_PNG - libpng [multiplatform, free, open-source]
HB_WITH_QT - QT (GUI) [multiplatform, free, open-source]
HB_WITH_SQLITE3 - sqlite3 [multiplatform, free, open-source]
HB_WITH_TINYMT - TinyMT (Mersenne Twister) [multiplatform, free, open-source]
HB_WITH_WATT - Watt-32 (TCP/IP sockets) [dos, free, open-source]
HB_WITH_ZLIB - zlib [multiplatform, free, open-source]
HB_WITH_XDIFF - libxdiff (file differences/patches) [multiplatform, free, open-source]
Windows 95 Winsock2 [win, free, closed-source]
- Information: Microsoft KB182108 "Availability of Windows Sockets 2.0 for Windows 95"
- Search for
w95ws2setup.exe
(required for Win95 support to run applications built with Harbour)
Windows UNICOWS .dll [win, free, closed-source]
- https://go.microsoft.com/fwlink/?LinkId=14851(required for Win9x/ME support to run applications built with Harbour in UNICODE mode)
Windows UNICOWS runtime/import library [win, free, open-source]
- http://libunicows.sourceforge.net/(required for Win9x/ME support at application built-time)
Tools:
Git (1.7 or upper) [multiplatform, free, open-source]
GitHub Client [multiplatform, free]
GNU Bison (grammer paser generator) [multiplatform, free, open-source]
- Windows binary:
- http://gnuwin32.sourceforge.net/packages/bison.htm(not verified with current Harbour version)
- Windows binary:
Valgrind (dynamic executable analysis tool) [linux, darwin-x86, free, open-source]
ack (programmer grep) [multiplatform, free, open-source]
Uncrustify (source formatter) [multiplatform, free, open-source]
UPX (executable compressor) [win, dos, *nix, free, open-source]
Nullsoft Installer [win, free, open-source]
7-Zip [multiplatform, free, open-source]
Info-ZIP [multiplatform, free, open-source]
bzip2 [multiplatform, free, open-source]Windows binary:*http://www.bzip.org/downloads.html
Chocolatey (Windows package manager) [free, open-source]
GNU Make
Windows binary + source:
- http://sourceforge.net/projects/mingw/files/MinGW/Extension/make/
- http://sourceforge.net/projects/mingw/files/MinGW/Extension/make/make-3.82-mingw32/make-3.82-5-mingw32-bin.tar.lzma/download
- http://sourceforge.net/projects/mingw/files/MinGW/Extension/make/make-3.82-mingw32/make-3.82-5-mingw32-src.tar.lzma/download
cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/make co make
(included in Harbour aswin-make.exe)
MS-DOS binary + source:
- ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/
- ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/mak381b.zip
- ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/mak381s.zip
(included in Harbour asdos-make.exe)
OS/2 binary + source (3.81r3 or upper):
- ftp://hobbes.nmsu.edu/pub/os2/dev/util/make-3.81-r3-bin-static.zip
- ftp://hobbes.nmsu.edu/pub/os2/dev/util/
(included in Harbour asos2-make.exe)
GNU core utils (mkdir, rm, cp, echo)
MS-DOS binary + source:
- ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/
- ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/fil41b.zip
- ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/fil41s.zip
- ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/shl2011b.zip
- ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/shtl208s.zip
- ftp://ftp.delorie.com/pub/djgpp/current/v2/djdev203.zip
- ftp://ftp.delorie.com/pub/djgpp/current/v2/djlsr203.zip
(included in Harbour asdosmkdir.exe,dosrm.exe,doscp.exe,dosecho.exe)
OS/2 binary:
Documentation:
- Homepage (version 3.0)(old version 2.0)
- Users' Mailing List (English language)
- Development Mailing List (English language)
- Source code
- Localization
- Issues
- Documents:
- hbmk2 documentation
- hbrun documentation
- ChangeLog
- ComparingHarbour to xHarbour
- CA-Cl*pper 5.3online documentation
- Harbouronline documentation
- Harbourinternal documents
- Wikipedia
This document Copyright © 2009–present Viktor Szakats (vszakats.net/harbour)
About
Portable, xBase compatible programming language and environment
Topics
Resources
License
Stars
Watchers
Forks
Packages0
Languages
- C80.1%
- xBase18.2%
- Makefile0.6%
- C++0.4%
- Harbour0.4%
- Yacc0.3%