Re: Compiling a agent extension under Linux

2009-03-25 Thread Dave Shield
2009/3/24 Rodolfo Leffa rodolfole...@gmail.com: How do I add a MIB to the defaults mibs to be loaded on net-snmp-config.h ?? Add the line config_add_mib( MY-MIB ) to the relevant module header file. Then when you run configure --with-mib-modules, it will add this MIB to the default list,

Re: Compiling a agent extension under Linux

2009-03-24 Thread Rodolfo Leffa
I've sucessfully compiled the net-snmp code with c++ code in my agent extension. I had to split my module compilation from the makefile to compile it with g++. The rest is compiled normally by the net-snmp Makefiles, and in the end I link the objects together. I'm testing and till now its working

Re: Compiling a agent extension under Linux

2009-03-18 Thread Dave Shield
2009/3/17 Rodolfo Leffa rodolfole...@gmail.com: After that, I rename my source file KhompData.cpp to KhompData.c and runned configure again. And that works. The line was uncommented on includes and there was a if (should_init(KhompData)) init_KhompData(); on mib_modules_init.h . Ah - that

Re: Compiling a agent extension under Linux

2009-03-18 Thread Rodolfo Leffa
I don't really need a C++ based SNMP environment. It's just some c++ structures that I have to use to get the information I want. By the way, I've sucessfully compile and run it on windows. I'll try to compile the whole sources with g++ instead of gcc. I'll put the results here after that to let

Re: Compiling a agent extension under Linux

2009-03-17 Thread Rodolfo Leffa
Hi, On Mon, Mar 16, 2009 at 5:54 PM, Dave Shield d.t.shi...@liverpool.ac.ukwrote: 2009/3/16 Rodolfo Leffa rodolfole...@gmail.com: [init_KhompData] should also appear in agent/mibgroup/mib_module_inits.h This file only exists in win32/ folder of my net-snmp sources. Nothing like that

Re: Compiling a agent extension under Linux

2009-03-16 Thread Rodolfo Leffa
Thanks again Dave. About the init routine, I have it on my module source file(the same I've done to Windows). I've runned configure --with-mib-modules=KhompData (name of my module), and after I use grep to see what files contains this string in the whole net-snmp directory. Except for the win32

Re: Compiling a agent extension under Linux

2009-03-16 Thread Dave Shield
2009/3/16 Rodolfo Leffa rodolfole...@gmail.com: About the init routine, I have it on my module source file(the same I've done to Windows). I've runned configure --with-mib-modules=KhompData (name of my module), and after I use grep to see what files contains this string in the whole net-snmp

Re: Compiling a agent extension under Linux

2009-03-16 Thread Rodolfo Leffa
On Mon, Mar 16, 2009 at 12:08 PM, Dave Shield d.t.shi...@liverpool.ac.ukwrote: 2009/3/16 Rodolfo Leffa rodolfole...@gmail.com: About the init routine, I have it on my module source file(the same I've done to Windows). I've runned configure --with-mib-modules=KhompData (name of my

Re: Compiling a agent extension under Linux

2009-03-16 Thread Dave Shield
2009/3/16 Rodolfo Leffa rodolfole...@gmail.com: [init_KhompData] should also appear in agent/mibgroup/mib_module_inits.h This file only exists in win32/ folder of my net-snmp sources. Nothing like that on net-snmp\agent\mibgroup\ In which case there is definitely something strange about your

Re: Compiling a agent extension under Linux

2009-03-16 Thread Rodolfo Leffa
Thanks Dave. I'll download net-snmp again and use the recent downloaded configure to see what happens. Tomorrow I put the results here. On Mon, Mar 16, 2009 at 5:54 PM, Dave Shield d.t.shi...@liverpool.ac.ukwrote: 2009/3/16 Rodolfo Leffa rodolfole...@gmail.com: [init_KhompData] should also

Compiling a agent extension under Linux

2009-03-09 Thread Rodolfo Leffa
Hi, i've extended the net-snmp agent on windows to provide my company information. It works ok. But now i'm trying to do it on Linux, and i'm having a problem in compiling it with the things I need. I've runned configure --with-my-module, but the problem is that my piece of code needs to acess

Re: Compiling a agent extension under Linux

2009-03-09 Thread Dave Shield
2009/3/9 Rodolfo Leffa rodolfole...@gmail.com: my piece of code needs to acess some libraries and use some linker flags. My question is where should I put this kind of info, once the makefiles are generated automatically by configure. Try running configure using the option --with-libs=xxx