From 2a574216a7b381b730c902a707f9b5a9646caa06 Mon Sep 17 00:00:00 2001 From: Attila Kovacs Date: Thu, 10 Oct 2024 11:53:22 +0200 Subject: [PATCH] README edit and site update --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 91f330e..249293d 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Last Updated: 18 September 2024 - [Introduction](#introduction) - [Prerequisites](#prerequisites) - [Building RedisX](#building-redisx) + - [Linking your application against RedisX](#linking) - [Managing Redis server connections](#managing-redis-server-connections) - [Simple Redis queries](#simple-redis-queries) - [Accessing key / value data](#accessing-key-value-data) @@ -118,6 +119,24 @@ After configuring, you can simply run `make`, which will build the `shared` (`li analysis via the `check` target. Or, you may build just the components you are interested in, by specifying the desired `make` target(s). (You can use `make help` to get a summary of the available `make` targets). +----------------------------------------------------------------------------- + + +## Linking your application against RedisX + +Provided you have installed the shared (`libredisx.so` and `libxchange.so`) or static (`libredisx.a` and +`libxchange.so`) libraries in a location that is in your `LD_LIBRARY_PATH` (e.g. in `/usr/lib` or `/usr/local/lib`) +you can simply link your program using the `-lredisx -lxchange` flags. Your `Makefile` may look like: + +```make +myprog: ... + cc -o $@ $^ $(LDFLAGS) -lredisx -lxchange +``` + +(Or, you might simply add `-lredisx -lxchange` to `LDFLAGS` and use a more standard recipe.) And, in if you installed +the __RedisX__ and/or __xchange__ libraries elsewhere, you can simply add their location(s) to `LD_LIBRARY_PATH` prior +to linking. + -----------------------------------------------------------------------------