Since there are no instructions on their wiki or Github, this is what I tried:
make
examples/cpuinfo.c
:cd examples/
gcc -Wall -I../include -L../build-src -lsigar cpuinfo.c
It gives me:
cpuinfo.c:(.text+0x20): undefined reference to `sigar_open'
cpuinfo.c:(.text+0x33): undefined reference to `sigar_cpu_list_get'
cpuinfo.c:(.text+0x4d): undefined reference to `sigar_strerror'
cpuinfo.c:(.text+0xff): undefined reference to `sigar_cpu_list_destroy'
cpuinfo.c:(.text+0x10b): undefined reference to `sigar_close'
What do I have to link it with to resolve these errors?
Move -lsigar
to the end of the list, after cpuinfo.c