[rrd-developers] librrd vs. rrd.h -- incomplete interface

Bernhard Fischer rep.dot.nop at gmail.com
Fri May 18 11:29:31 CEST 2007


Hi,
[sorry if this is either a FAQ or more appropriate to the -user list]

I want to use the functions exported by librrd (e.g.: nm -g
--defined-only .../librrd.so).

$ cat ugh.c 
#include <rrd.h>
int main(void) {
        rrd_t rrd;
        FILE *rrd_f;
        char *inp = "./my.rrd";
        if (rrd_open (inp, &rrd_f, &rrd, RRD_READONLY) < 0)
                return 1;
        /* fiddle */
        rrd_free (&rrd);
        return 0;
}
$ gcc -I/opt/rrdtool-1.2.23-svn/include/ -L/opt/rrdtool-1.2.23-svn/lib/ -lrrd ugh.c 
ugh.c: In function 'main':
ugh.c:3: error: 'rrd_t' undeclared (first use in this function)
ugh.c:3: error: (Each undeclared identifier is reported only once
ugh.c:3: error: for each function it appears in.)
ugh.c:3: error: expected ';' before 'rrd'
ugh.c:6: error: 'rrd' undeclared (first use in this function)
ugh.c:6: error: 'RRD_READONLY' undeclared (first use in this function)


In order to use librrd, i have to copy large junks of e.g. rrd_format.h

Can we please merge rrd_format.h (and it's includes, currently
rrd_nan_inf.h) into rrd.h to make the lib useable?

Comments?

TIA and kind regards,



More information about the rrd-developers mailing list