This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Help requested in using gcc 2.95
- From: Gaurav Singh <singgau3 at iit dot edu>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 31 Oct 2003 16:57:21 -0600
- Subject: Help requested in using gcc 2.95
- Reply-to: singgau3 at iit dot edu
Hi
I have written only these 2 lines of code
When I try to compile the program It gives the error as described
Can you pleease help me
Thankx in advance
Gaurav
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <unistd.h>
#define SERVER_PORT 54203
#define SERVER_NAME cs.babbage.iit.edu
int main(int argc,char *argv[])
{
int s;
s= socket(AF_INET,SOCK_STREAM,0);
return 0;
}
bash-2.03$ gcc -o Client ClientSocket.c
Undefined first referenced
symbol in file
socket /var/tmp/ccipJJFU.o
ld: fatal: Symbol referencing errors. No output written to Client