[ee122] compile questions for proj1

abhishekd at berkeley.edu abhishekd at berkeley.edu
Sun Sep 16 21:51:47 PDT 2007


So I don't exactly understand how to compile the client file I have been
working on so far. Either that or my includes are messed up...I keep
getting the following error when doing gcc -g -Wall -std=c99 -o
http_client.o client.c   client.h

Undefined                       first referenced
 symbol                             in file
gethostbyname                       /var/tmp//cckWfo1l.o
socket                              /var/tmp//cckWfo1l.o
connect                             /var/tmp//cckWfo1l.o

My includes are as follows:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#include <netdb.h>

That may be more includes than I need...I probably have some simple error
that needs to be fixed but am stuck at the moment and can't really
progress without solving this issue...

Thanks for your help
Abhishek Doshi

More information about the ee122 mailing list