Programming Sockets

Can anyone help me to get a socket connected.

I am trying to open a socket in QNX neutrino for a TCP/IP stream client just a basic program so i can send information to other hardware (not running qnx). This is easy enough in Win32 or linux but is proving difficult in QNX. The compiler gives this response:

#qcc c_client.c
/tmp/AAA891811_cc.o: In function ‘main’
/tmp/AAA891811_cc.o(.text+0x49): undefined reference to ‘gethost by name’
/tmp/AAA891811_cc.o(.text+0x82): undefined reference to ‘socket’
…the same for all socket.h functions…
cc: /usr/bin/ntox86-1d error1

I am sure i am missing something obvious!

I have included :
<sys/types.h>
<sys/socket.h>
<netinet/in.h>
<netdb.h>

Thanks.

qcc -o c_client c_client.c -lsocket

Thanks : )

that sorted it - cheers!