Got error when compiling the check_nc_net.c ....pls help !!!
...
GNU CPP version 3.2.3 20030502 (Red Hat Linux 3.2.3-47) (cpplib) (i386 Linux/ELF)
GNU C version 3.2.3 20030502 (Red Hat Linux 3.2.3-47) (i386-redhat-linux)
compiled by GNU C version 3.2.3 20030502 (Red Hat Linux 3.2.3-47).
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
ignoring duplicate directory "/usr/local/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
..
.
../gl
/usr/kerberos/include
../lib
/usr/local/include
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/include
/usr/include
End of search list.
as -V -Qy -o /tmp/ccGNktUV.o /tmp/ccwU0jLK.s
GNU assembler version 2.14.90.0.4 (i386-redhat-linux) using BFD version 2.14.90.0.4 20030523
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o check_nc_net /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../crt1.o /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../crti.o /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/crtbegin.o -L ../lib -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3 -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../.. /tmp/ccGNktUV.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/crtend.o /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../crtn.o
/tmp/ccGNktUV.o(.text+0x18d): In function `main':
: undefined reference to `usage4'
/tmp/ccGNktUV.o(.text+0x195): In function `main':
: undefined reference to `socket_timeout_alarm_handler'
/tmp/ccGNktUV.o(.text+0x1a8): In function `main':
: undefined reference to `socket_timeout'
/tmp/ccGNktUV.o(.text+0x11bc): In function `main':
: undefined reference to `fperfdata'
/tmp/ccGNktUV.o(.text+0x23d8): In function `main':
: undefined reference to `usage4'
/tmp/ccGNktUV.o(.text+0x2440): In function `process_arguments':
: undefined reference to `socket_timeout'
/tmp/ccGNktUV.o(.text+0x2454): In function `process_arguments':
: undefined reference to `is_option'
/tmp/ccGNktUV.o(.text+0x25f2): In function `process_arguments':
: undefined reference to `usage2'
/tmp/ccGNktUV.o(.text+0x2639): In function `process_arguments':
: undefined reference to `print_revision'
/tmp/ccGNktUV.o(.text+0x268c): In function `process_arguments':
: undefined reference to `is_intnonneg'
/tmp/ccGNktUV.o(.text+0x26c9): In function `process_arguments':
: undefined reference to `die'
/tmp/ccGNktUV.o(.text+0x2d44): In function `process_arguments':
: undefined reference to `socket_timeout'
/tmp/ccGNktUV.o(.text+0x2d4a): In function `process_arguments':
: undefined reference to `socket_timeout'
/tmp/ccGNktUV.o(.text+0x2dc2): In function `fetch_data':
: undefined reference to `process_request'
/tmp/ccGNktUV.o(.text+0x2dea): In function `fetch_data':
: undefined reference to `die'
/tmp/ccGNktUV.o(.text+0x2e19): In function `fetch_data':
: undefined reference to `die'
/tmp/ccGNktUV.o(.text+0x2e80): In function `strtoularray':
: undefined reference to `is_numeric'
/tmp/ccGNktUV.o(.text+0x2f82): In function `print_help':
: undefined reference to `print_revision'
collect2: ld returned 1 exit status
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Use Check_nc_Net.c for the latest functions and commands that are in NC_Net.
check_nc_net was modified from Check_nt.c frim the "Official Nagios Plugins Version 1.4 Beta1"
so the easiest way to compile it is:
download and compile the offical Nagios Plugin version 1.4Beta1
once you used the "make" command on this package. then you can copy check_nc_net.c to the check_nt.c (overwriting check_nt.c)
then just run "make" again and it would see that the check_nt.c has been changed and compile.
once it compiles sucessfully just copy the check_nt binary to check_nc_net
Not all versions of the nagions plugin work. Check_nc_net has only been tested against v1.4beta1 since that was the version that I forked check_nc_net from.
I hope this solves the issue for you
TOny
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Got error when compiling the check_nc_net.c ....pls help !!!
...
GNU CPP version 3.2.3 20030502 (Red Hat Linux 3.2.3-47) (cpplib) (i386 Linux/ELF)
GNU C version 3.2.3 20030502 (Red Hat Linux 3.2.3-47) (i386-redhat-linux)
compiled by GNU C version 3.2.3 20030502 (Red Hat Linux 3.2.3-47).
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
ignoring duplicate directory "/usr/local/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
..
.
../gl
/usr/kerberos/include
../lib
/usr/local/include
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/include
/usr/include
End of search list.
as -V -Qy -o /tmp/ccGNktUV.o /tmp/ccwU0jLK.s
GNU assembler version 2.14.90.0.4 (i386-redhat-linux) using BFD version 2.14.90.0.4 20030523
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o check_nc_net /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../crt1.o /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../crti.o /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/crtbegin.o -L ../lib -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3 -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../.. /tmp/ccGNktUV.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/crtend.o /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../crtn.o
/tmp/ccGNktUV.o(.text+0x18d): In function `main':
: undefined reference to `usage4'
/tmp/ccGNktUV.o(.text+0x195): In function `main':
: undefined reference to `socket_timeout_alarm_handler'
/tmp/ccGNktUV.o(.text+0x1a8): In function `main':
: undefined reference to `socket_timeout'
/tmp/ccGNktUV.o(.text+0x11bc): In function `main':
: undefined reference to `fperfdata'
/tmp/ccGNktUV.o(.text+0x23d8): In function `main':
: undefined reference to `usage4'
/tmp/ccGNktUV.o(.text+0x2440): In function `process_arguments':
: undefined reference to `socket_timeout'
/tmp/ccGNktUV.o(.text+0x2454): In function `process_arguments':
: undefined reference to `is_option'
/tmp/ccGNktUV.o(.text+0x25f2): In function `process_arguments':
: undefined reference to `usage2'
/tmp/ccGNktUV.o(.text+0x2639): In function `process_arguments':
: undefined reference to `print_revision'
/tmp/ccGNktUV.o(.text+0x268c): In function `process_arguments':
: undefined reference to `is_intnonneg'
/tmp/ccGNktUV.o(.text+0x26c9): In function `process_arguments':
: undefined reference to `die'
/tmp/ccGNktUV.o(.text+0x2d44): In function `process_arguments':
: undefined reference to `socket_timeout'
/tmp/ccGNktUV.o(.text+0x2d4a): In function `process_arguments':
: undefined reference to `socket_timeout'
/tmp/ccGNktUV.o(.text+0x2dc2): In function `fetch_data':
: undefined reference to `process_request'
/tmp/ccGNktUV.o(.text+0x2dea): In function `fetch_data':
: undefined reference to `die'
/tmp/ccGNktUV.o(.text+0x2e19): In function `fetch_data':
: undefined reference to `die'
/tmp/ccGNktUV.o(.text+0x2e80): In function `strtoularray':
: undefined reference to `is_numeric'
/tmp/ccGNktUV.o(.text+0x2f82): In function `print_help':
: undefined reference to `print_revision'
collect2: ld returned 1 exit status
Use Check_nc_Net.c for the latest functions and commands that are in NC_Net.
check_nc_net was modified from Check_nt.c frim the "Official Nagios Plugins Version 1.4 Beta1"
so the easiest way to compile it is:
download and compile the offical Nagios Plugin version 1.4Beta1
once you used the "make" command on this package. then you can copy check_nc_net.c to the check_nt.c (overwriting check_nt.c)
then just run "make" again and it would see that the check_nt.c has been changed and compile.
once it compiles sucessfully just copy the check_nt binary to check_nc_net
Not all versions of the nagions plugin work. Check_nc_net has only been tested against v1.4beta1 since that was the version that I forked check_nc_net from.
I hope this solves the issue for you
TOny
Yes, Thanks for your tips, it works very well now. ;D Havent try to exec a .vbs script yet.