Hi all,
I am trying to run the make on agentX example in this tutorial here:
http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent
but when I run make on example-demon, it gives me the following error
messages and looks like it can't link the header files properly:
[root@localhost agent]# make example-demon
gcc -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT
-D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/lib64/perl5/CORE -I../include -I. -I../agent -I../agent/mibgroup
-I../snmplib example-demon.c -o example-demon
/tmp/ccAIXgYe.o: In function `main':
/root/net-snmp-5.7.2.1/agent/example-demon.c:25: undefined reference to
`snmp_enable_stderrlog'
/root/net-snmp-5.7.2.1/agent/example-demon.c:30: undefined reference to
`netsnmp_ds_set_boolean'
/root/net-snmp-5.7.2.1/agent/example-demon.c:41: undefined reference to
`init_agent'
/root/net-snmp-5.7.2.1/agent/example-demon.c:46: undefined reference to
`init_nstAgentSubagentObject'
/root/net-snmp-5.7.2.1/agent/example-demon.c:55: undefined reference to
`init_snmp'
/root/net-snmp-5.7.2.1/agent/example-demon.c:66: undefined reference to
`snmp_log'
/root/net-snmp-5.7.2.1/agent/example-demon.c:72: undefined reference to
`agent_check_and_process'
/root/net-snmp-5.7.2.1/agent/example-demon.c:76: undefined reference to
`snmp_shutdown'
collect2: error: ld returned 1 exit status
make: *** [example-demon] Error 1
I copy the files into the net-snmp directory under agent:
/net-snmp-5.7.2.1/agent
seems like I have all the libraries as well:
# net-snmp-config --libs
-L/usr/local/lib -lnetsnmp -lrt -lm
What is the probable cause of this?
Thanks,
Ali
--
Ali Eshragi
MEng electrical & computer engineering
University of Waterloo
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users