簡単なプログラム:
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <netdb.h>
int main(int argc, char **argv)
{
int ret = rexec((char**) 0, "", "", "", 0);
return 0;
}
コンパイル:
$ g++ -o rexec -D_XOPEN_SOURCE_EXTENDED rexec.cpp
rexec.cpp: In function 'int main(int, char**)':
rexec.cpp:10:49: error: 'rexec' was not declared in this scope