<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Problem compiling plugin</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2 FACE="Arial">Hello!</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Subhendu has been a huge help, but I think I have drove him crazy. :)</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I'm trying to compile the check_nt plugin on a FreeBSD 4.6.2 machine.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I have run the following command successfully:</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">gcc -g -O2 -I/path/to/nagiosplug/plugins -L/path/to/nagiosplug/plugins -c check_nt.c</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">This creates the check_nt.o file.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I then run:</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">gcc -g -O2 -I/path/to/nagiosplug/plugins -L</FONT><FONT SIZE=2 FACE="Courier New">/path/to/nagiosplug/plugins</FONT> <FONT SIZE=2 FACE="Courier New">check_nt.o -o check_nt utils.o</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">This fails....</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">check_nt.o: In function `main':</FONT>
<BR><FONT SIZE=2 FACE="Arial">/tmp/nagios-plugins-200211131100/plugins/check_nt.c(.text+0x17c): undefined reference to `socket_timeout_alarm_handler'</FONT>
<BR><FONT SIZE=2 FACE="Arial">/tmp/nagios-plugins-200211131100/plugins/check_nt.c(.text+0x1e7): undefined reference to `process_tcp_request'</FONT>
<BR><FONT SIZE=2 FACE="Arial">/tmp/nagios-plugins-200211131100/plugins/check_nt.c(.text+0x2f4): undefined reference to `process_tcp_request'</FONT>
<BR><FONT SIZE=2 FACE="Arial">/tmp/nagios-plugins-200211131100/plugins/check_nt.c(.text+0x497): undefined reference to `process_tcp_request'</FONT>
<BR><FONT SIZE=2 FACE="Arial">/tmp/nagios-plugins-200211131100/plugins/check_nt.c(.text+0x627): undefined reference to `process_tcp_request'</FONT>
<BR><FONT SIZE=2 FACE="Arial">/tmp/nagios-plugins-200211131100/plugins/check_nt.c(.text+0x8aa): undefined reference to `process_tcp_request'</FONT>
<BR><FONT SIZE=2 FACE="Arial">check_nt.o(.text+0x989):/tmp/nagios-plugins-200211131100/plugins/check_nt.c: more undefined references to `process_tcp_request' follow</FONT></P>
<P><FONT SIZE=2 FACE="Arial">check_nt.o: In function `process_arguments':</FONT>
<BR><FONT SIZE=2 FACE="Arial">/tmp/nagios-plugins-200211131100/plugins/check_nt.c(.text+0x11a0): undefined reference to `getopt_long'</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I have also tried:</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">gcc -g -O2 -I/path/to/nagiosplug/plugins -L</FONT><FONT SIZE=2 FACE="Courier New">/path/to/nagiosplug/plugins</FONT> <FONT SIZE=2 FACE="Courier New">-o check_nt utils.o -lutils</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">This fails as well.</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">Any help wuould be appreciated!</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">Thanks!</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">Garrett</FONT>
</P>
<BR>
<BR>
</BODY>
</HTML>