title: How to initialize SNMP in C
body: <p>Can anyone tell me how to initialize a SNMP agent in c using SNMP library?
  The call to "init_agent()" is not working.</p>
  
  <p>I read somewhere that "init_agent()" function should be used before "init_snmp()".
  Here is what I am getting while compiling the code:</p>
  
  <pre><code>/tmp/ccEiSj2l.o: In function `main':
  agent1.c:(.text+0x95): undefined reference to `init_agent'
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>I have linked the compiler to snmp library using "-lsnmp".</p>