Hello,
I actually try to make client-server program.
I'm using SCO OpenServer Release 5.0.0 and when I try to compile my code (by TELNET) I've got this error :
Quote:
Undefined first referenced
symbol in file
socket /usr/tmp/cca000Hf1.o
a.out: fatal error: Symbol referencing errors. No output written to a.out
|
I'm just using this simple code :
Quote:
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdio.h>
#define ADDRESS "192.168.0.191"
char *strs[3] = {"Message test - Socket"};
main()
{
char c;
FILE *fp;
int fromlen;
register int i, s, ns, len;
struct sockaddr_un saun, fsaun;
if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
{
perror("server: socket");
exit(1);
}
exit(0);
}
|
and I get the same error if I use :
Quote:
gcc serv.c
or
cc serv.c
or
c++ serv.c
|
If someone can help me,
Thanks