Hi…
what library do I need to compile against to generate code that utilizes
the <rpc/rpc.h> calls?
Regards…
Miguel
qcc -V gcc_ntox86 example1.c -o rpc1
/tmp/AAA314855_cc.o: In function `main’:
/tmp/AAA314855_cc.o(.text+0x34): undefined reference to xdrmem_create' /tmp/AAA314855_cc.o(.text+0x78): undefined reference to
xdr_int’
/tmp/AAA314855_cc.o(.text+0xbc): undefined reference to `xdr_wrapstring’
cc: /usr/bin/ntox86-ld error 1
===================================
#include <rpc/xdr.h>
int main(int argc, char *argv[])
{
char buf[1024];
XDR x;
int n=5;
char *s=“Hello, world.”;
xdrmem_create(&x,buf,1024,XDR_ENCODE);
printf("%d\n",xdr_getpos(&x));
xdr_int(&x,&n);
printf("%d\n",xdr_getpos(&x));
xdr_wrapstring(&x,&s);
printf("%d\n",xdr_getpos(&x));
return 0;
}
\
–
my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.
Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com