I wrote a test program like this:
#include <sys/socket.h>
int main( void ) {
int sock = socket(AF_INET, SOCK_DGRAM, 0);
return 0;
}
And tried to compile it:
$ /tool/sunstudio/bin/cc test.c
Undefined first referenced
symbol in file
socket test.o
ld: fatal: Symbol referencing errors. No output written to a.out
The output is "symbol socket is not referenced".
Kindly give me the direction so that I can resolve this.