Re: Compiling a agent extension under Linux

Rodolfo Leffa <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I've found the --with-mibs="item1:item2:" option on configure.

But I'm doubt if I should put the whole list of mibs here or just the ones I
wanna add. Does this option sob overwrite the defaults mib modules?

[]s


On Tue, Mar 24, 2009 at 5:20 PM, Rodolfo Leffa <[email protected]>wrote:

> 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 normally.
>
> Now I have a simple doubt. How do I add a MIB to the defaults mibs to be
> loaded on net-snmp-config.h ?? I've looked for it in configure --help, but I
> didnt find it.
>
> Thanks
>
>
>
>
> On Wed, Mar 18, 2009 at 11:44 AM, Rodolfo Leffa <[email protected]>wrote:
>
>> 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 others know if this can work.
>>
>> Thanks Dave.
>>
>> []s
>>
>>
>> On Wed, Mar 18, 2009 at 7:16 AM, Dave Shield <[email protected]>wrote:
>>
>>> 2009/3/17 Rodolfo Leffa <[email protected]>:
>>> > 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 would explain it, yes.
>>> The Net-SNMP configure system looks for "file.c", not "file.cpp"
>>>
>>>
>>> > BUT, i can't compile (make) the sources now because there are some C++
>>> > structures defined on my code. Anybody knows a solution to this?
>>> Without
>>> > having to convert and data structures and code to C style ;-)
>>>
>>> The Net-SNMP package is written in *C*, not C++
>>>
>>> If you want to use C++, then you should perhaps look at using a C++-based
>>> SNMP environment.  (e.g. SNMP++)
>>>
>>> Dave
>>>
>>
>>
>>
>> --
>> Rodolfo Leffa de Oliveira
>>
>>
>
>
> --
> Rodolfo Leffa de Oliveira
>
>


-- 
Rodolfo Leffa de Oliveira

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com

_______________________________________________
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.