USING DECODING WITHOUT INSTALLING IT

OVERVIEW

This page describes how to use the library without installing it.

DESCRIPTION

You do not have time, do not know how or do not want to install decoding but still, you want to use it. Suppose that you have uncompress decoding in /dir/where/decoding/is. Just run make within the directory of decoding. Then you can use decoding without doing anything else.

HOW TO USE DECODING?

Go to your favorite directory where you write code. Create any .c file, say foo.c containing for exemple

#include <decoding/decoding.h>

#define PRIME 101
#include <decoding/rings/gfp_word.c>
#include <decoding/algos.c>

int main(void) {
  gf101 a;
  gf101_random(a);
  gf101_ll_print("a=%en",&a);
  return 0;
}

If you want to compile foo.c just type at prompt

gcc `/dir/where/decoding/is/cflags` foo.c `/dir/where/decoding/is/ldflags` -o foo

If you have a Makefile for your project you can for exemple add in it the following.

...
CC               = your_favorite_compiler
CFLAGS           = your_cflags
LDFLAGS          = your_ldflags
...
DECODING_CFLAGS  = /dir/where/decoding/is/cflags
DECODING_LDFLAGS = /dir/where/decoding/is/ldflags

...

foo:
        $(CC) `$(DECODING_CFLAGS)` $(CFLAGS) foo.c `$(DECODING_LDFLAGS)` $(LDFLAGS) -o foo

...

The executable you will build will be indenpendent of decoding because decoding only comes with a static library (.a file). This is particularily useful if you are building a library that you want to redistribute.

WHERE IS THE DOCUMENTATION?

If you do not install decoding you are not able, a priori, to consult the manpages with a simple call to man. You have to specify the directory of the manpage you want to consult. For exemple to see this manpage you have to type the following.

man /dir/where/decoding/is/doc/man3/decoding-cwi.3

You can also add the /dir/where/decoding/is/doc to the MANPATH environment variable so that man will also search in the latter directory for manpages. You can than consult the current manpage with a simple man deciding-cwi.

If you are fond of HTML you can also access the HTML documentation. Open the /dir/where/decoding/is/doc/html/index.html in your favorite browser and just read the documentation.

AUTHOR

Written by Guillaume Quintin (quintin@lix.polytechnique.fr).

SEE ALSO

decoding-quick(3), man(1).