Projekat

Općenito

Profil

Harbour build

Linux

hardy /etc/apt/sources.list

deb http://ppa.launchpad.net/hernad-b-out-ba/ubuntu hardy main

intrepid /etc/apt/sources.list

deb http://ppa.launchpad.net/hernad-b-out-ba/ubuntu intrepid main

$ sudo apt-get install harbour

~/.bashrc

HB_PREF=hb
HB_ARCHITECTURE=linux
HB_COMPILER=gcc
HB_GT_LIB=gttrm

HB_INC_COMPILE=/usr/include/harbour
HB_LIB_COMPILE=/usr/lib/harbour

export HB_ARCHITECTURE HB_GT_LIB HB_COMPILER 

export HB_LIB_COMPILE 
export HB_INC_COMPILE

Windows mingw32

Makefile statemens

harbour core

harbour base dir:

HB_ROOT=c:/cygwin/usr/harbour

HB_DIR - Makefile - harbour base dir location

ifeq ($(HB_ROOT),)
HB_DIR = ../harbour/harbour
else
HB_DIR = $(HB_ROOT)
endif

core libs

HB_LIBS= -lhbvm -lhbrtl -lhbcpage  -lhblang -lhbrdd -lhbrtl  -lhbmacro -lhbpp -lrddntx -lrddcdx -lrddfpt -lhbcommon -lhbcpage -lhbsix

windows libs

-lm -luser32 -lwinspool -lole32 -loleaut32 -luuid -lgdi32 -lcomctl32 -lcomdlg32 -lodbc32

gcc flags for creating exe (no console window):

GCC_FLAGS = -mms-bitfields -mwindows -mno-cygwin

location of harbour libs

LIB_DIR = $(HB_DIR)/lib

xhgtk, gtk libs

xhgtk lib:

HB_LIBS += -lxhgtk

gtk libs:

GTK_LIBS = $(shell mingw-pkg-config --cflags gtk+-2.0)
GTK_LIBS += $(shell mingw-pkg-config --libs gtk+-2.0 libglade-2.0)

gcc exe statement

$(BIN_DIR)/name_of_the_exe : obj_1.o obj_2.o obj_3.o 
        gcc $^ -o$(BIN_DIR)/name_of_the_exe -L$(LIB_DIR) $(GCC_FLAGS) -Wl,--start-group $(HB_LIBS) -Wl,--end-group $(WIN_LIBS) $(GTK_LIBS)