Thanks for the reply Sir,
 
What i mean was i am getting C files from MIB2C
but as of such i dont run any OS on my hardware
if suppose i burn these C files on to the ROM
will they work (according to me will not)
 
as these c files are associated with net-snmp headers
i wann to generate a C file which will take all these header files or should not require any third party libraries to execute on the hardware
it should be stand alone system
 
Thanks
 
Suddavanda
 
 
On Wed, 2006-02-15 at 13:30 +0530, Santhosh wrote:
> I am using Net-Snmp-5.3.0.1 for MIB2C compiler

Well, "mib2c" isn't strictly a compiler - it's
really more of a code generator.   And to answer
the question in the subject, these code files
*do* require a compiler before they can be run.

The flow of activity is as follows:


         +-------+              +-----+
 MIB --> | mib2c | -> *.[ch] -> | gcc | -> agent
file     +-------+              +-----+    module


It's that last "agent module" that is what's run
(either linked into the main agent binary, loaded
 dynamically or as part of a subagent).

 
> can i generate .c & .h files which are Position Independent and can
> carry headers along with them
> as i need to port these files on my hardware in need to make these
> files static

I'm sorry - I don't understand what you mean.
The .c and .h files are simply C code.
Whether the agent module uses Position Independent Code
or not, depends purely on how you compile them.
The source code is unaffected by this.

Dave

 

Reply via email to