File: README.Debian

package info (click to toggle)
libgdchart-gd2 0.11.5-12.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 352 kB
  • sloc: ansic: 4,219; makefile: 278
file content (35 lines) | stat: -rw-r--r-- 1,407 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
libgdchart-gd2 for Debian
=========================

To compile a program that uses libgdchart in Debian, the following must be
true:

   - One source file of the program must contain the following #includes:

     #include <gdc.h>
     #include <gdchart.h>
     #include <gdcpie.h>

     The program must include all three header files, even if it does not use
     gdcpie.

   - HAVE_LIBFREETYPE must be defined, regardless of whether the program uses
     libfreetype or not.

If either of the above is not true, linking will fail with unresolved symbols.
Thus, in order, for example, to get the example program, gdc_samp1.c, to
compile, you must add #include <gdcpie.h> in the code, and then run
  gcc -D HAVE_LIBFREETYPE -o gdc_samp1 gdc_samp1.c -lgdc

The reason for this is that certain global variables used by gdchart are
defined in the header files, which either declare the globals as "extern", or
actually define them, depending on a condition, namely whether GDC_LIB is
defined. The shared library installed by Debian has references to many such
globals, and these must be defined in the program.

Another problem is that if more than one source file includes the header files,
the globals will be defined multiple times. You can try specifying
  #define GDC_LIB
before the #includes in all but one source files.

  -- Antonios Christofides <anthony@itia.ntua.gr>  Fri, 9 Apr 2004 19:48:03 UTC