编译net-snmp测试程序引用libnetsnmp.a库,编译报如下错误,网上查了下,需要在编译的时候引用-lrt库,增加后编译成功。

cc -g -o container_test container-snmp-demo.c -lnetsnmp -lcrypto -lrt -L./libs

编译问题二  /snmplib/tools.c:920 undefined reference to `clock_gettime