Hi All,
I have problems with compiling rpc program which calls
a simple lib rpc routine 'rnusers()'
Here is the progarm code:
#include <stdio.h>
main(argc, argv)
int argc;
char **argv;
{
int num;
if (argc != 2) {
fprintf(stderr, "usage: rnusers
hostname\n");
exit(1);
}
if ((num = rnusers(argv[1])) < 0) {
fprintf(stderr, "error: rnusers\n");
exit(-1);
}
printf("%d users on %s\n", num, argv[1]);
exit(0);
}
I compiled this as fallows:
cc -o rnusers rnusers.c -lrpcsvc
I got the following error:
[root@linux1 test]# cc -o sample sample1.c -lrpcsvc
/tmp/ccf72jGn.o: In function `main':
/tmp/ccf72jGn.o(.text+0x3a): undefined reference to
`rnusers'
collect2: ld returned 1 exit status
Help Please .
Thanks in advance.
chandana_ts.
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help