Hello coders,

I'm trying to compile a custom SNMP subagent with caching capabilities, but
I'm facing this issue:

rodrigo@zangaro:~/cache$ *make*
gcc -I. `net-snmp-config --cflags` -c -o example-demon.o example-demon.c
gcc -I. `net-snmp-config --cflags` -c -o pgstatDatabaseTable.o
pgstatDatabaseTable.c
gcc -o example-demon example-demon.o pgstatDatabaseTable.o `net-snmp-config
--agent-libs`
pgstatDatabaseTable.o: In function `initialize_table_pgstatDatabaseTable':
/home/rodrigo/cache/pgstatDatabaseTable.c:160: *undefined reference to
`netsnmp_cache_free'*
/home/rodrigo/cache/pgstatDatabaseTable.c:164: *undefined reference to
`netsnmp_table_registration_info_free'*
collect2: ld returned 1 exit status
make: *** [example-demon] Erreur 1

The source code can be fetched from here:
https://github.com/hjort/pgstatmib/tree/master/labs/cache

More info:

*$ net-snmp-config --cflags*
-DNETSNMP_ENABLE_IPV6 -g -O2 -DNETSNMP_USE_INLINE -Ulinux -Dlinux=linux
-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.10/CORE -I. -I/usr/include

*$ net-snmp-config --agent-libs*
-Wl,-Bsymbolic-functions -L/usr/lib -lnetsnmpagent -lnetsnmphelpers
-lnetsnmpmibs -lnetsnmp -Wl,-E

*$ ls -1 /usr/lib/libnetsnmp*.la
*/usr/lib/libnetsnmpagent.la
/usr/lib/libnetsnmphelpers.la
/usr/lib/libnetsnmp.la
/usr/lib/libnetsnmpmibs.la
/usr/lib/libnetsnmptrapd.la

Does anyone have a clue on how to solve this?

Thanks in advance!

Best Regards,

-- 
Rodrigo Hjort
www.hjort.co
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to