[Nagiosplug-devel] How to start developing nagios plug ins in c

Andreas Ericsson ae at op5.se
Mon Apr 20 17:20:55 CEST 2009


Oliver wrote:
> Hello,
> 
> i am ne we in the topic of developing nagios plugins.
> 
> i thougt that it is a god start to compile a simple plugin such as check_dummy
> but the call cc -o test check_dummy.c failed.
> 
> I know that the lib and header pathes are missing but i dont know where the 
> libs are!
> 
> I am running nagios 3.06
> on an debian edge installation.
> 
> sorry for this stupid question but i am not a linux programmer!!
> In my daily business i am using microsoft products(visual studio 2005)
> 

I think your problem lies more along the lines of lacking linux/unix experience
than anything else, then.

Compiling a single file from a larger project is something that with depressing
frequency fails, because it will usually depend on other files (btw, your
error reporting skills are somewhat lackluster; If you'd given us the error
output, we could almost certainly have helped you).

I'd recommend starting your own project instead, where you know all the
intrinsic dependencies.

Spending an hour or three with gcc's and ld's documentation will prove useful
too, I guess (gcc is the compiler, ld is the linker; Most developers use the
compiler to call the linker as well, so when you know 'gcc' inside out you'll
be able to start building just about anything you want).

For larger projects, investing some time with the documentation of 'make'
will be well spent time.

Good luck.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.




More information about the Devel mailing list