Quote:
Try to compile the following code with g++:
Code:

#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>

int main ()
{
if (0 != fork ())
{
return 0;
}
return 0;
}



It doesn't compile, because fork() is in <unistd.h>. Once that's corrected, it certainly links. C++ is less forgiving than C of missing declarations, and thus of missing header files.

Peter