-
Notifications
You must be signed in to change notification settings - Fork 44
Using ADS from mod harbour on Linux
In order to use ADS from the mod harbour on Linux, we have to manage these shared libraries using Harbour dynamic linking:
libace.so similar to ace32.dll on Windows
libadsloc.so similar to AdsLoc32.dll on Windows
to build mod_harbour using ADS please follow these steps:
-
git clone https://github.com/harbour/core harbour
-
Install these packages:
sudo apt install libssl-dev
sudo apt install libcurl4-openssl-dev
-
before building Harbour use this export from the terminal: export HB_USER_CFLAGS=-fPIC
-
run make in harbour folder and Harbour will get built
-
To build librddads.a we need ace.h that we can get from here (installing the ADS SDK): https://github.com/FiveTechSoft/harbour_and_xharbour_builds/blob/master/aceapi_x86_64.exe
-
copy ace.h from above step into harbour/contrib/rddads
-
Manually compile each C file this way:
gcc -c -fPIC -I../../include ads1.c
gcc -c -fPIC -I../../include adsfunc.c
gcc -c -fPIC -I../../include adsmgmnt.c
gcc -c -fPIC -I../../include adsx.c
-
to build the librddads.a for Linux do this: ar rc ./librddads.a ads1.o adsx.o adsfunc.o adsmgmnt.o
-
copy librddads.a to harbour/lib/linux/gcc
-
In mod_harbour/linux add this lib name to libs.txt: -lrddads
-
In mod_harbour apache.prg modify this to force the use of ADS:
#define HB_WITH_ADS // new !!!
#ifdef HB_WITH_ADS
#define __HBEXTERN__RDDADS__REQUEST
#include "../../harbour/contrib/rddads/rddads.hbx"
#endif
- build mod_harbour running ./go.sh from mod_harbour/linux folder