RE: example program does not compile

"Mike Ayers" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <83E753BE7B6A324ABB336245BAF1DAAC071FF78C@mailserver.metatv-ds.metatv.com>
> From: [email protected] 
> [mailto:[email protected]] On 
> Behalf Of Devvrat Tripathi
> Sent: Saturday, September 15, 2007 9:00 AM

> I just installed the net-snmp package. Since this is the 
> first time i am using this package i tried to run the example 
> program given at the net snmp site. When i run the makefile 
> provided at the site i get the following error. 
> 
> gcc -I. `/usr/local/bin/net-snmp-config --cflags`    test1.c  
>  -o test1
> /tmp/ccyFZv5W.o: In function `main':
> /home/devvrat/test1.c:31: undefined reference to `init_snmp'
> /home/devvrat/test1.c:36: undefined reference to `snmp_sess_init' 
<SNIP/>

	Looks like it can't find the net-snmp libs.

> I have checked /usr/local/net-snmp-config --libs and 
> -lnetsnmp is present in it. I do not know why it is still not 
> able to find the above function definitions. It would be a 
> great help if someone can point out the problem. 

	I do not believe that net-snmp-config tells you what is on your system.  Rather, I think it tells you how your agent was compiled.  Most Linux distros allow you to install "net-snmp", which includes the master agaent, but not the libs and headers.  For that you need to install the "net-snmp-devel" package.


	HTH,

Mike

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.