Compiling problem?

I have got a QNX TCP/IP program “client.c”.It was written in C language. The program can be compiled and run in Linux. But in QNX gcc compiler, it has some problems. The compiler says: undifined reference to “gethostbyname” ,“bind”, “socket”,“connect”, “send”,“receive”
It seems like that the program couldn’t load the header file or library.

who can help me ? Thanks a lot!

and i am a Chinese user. :slight_smile:

you need to link socket (TCP/IP) library. add -lsocket to your link line.

btw, there is a chinese qnx forum at mama.indstate.edu/users/liug/for … um.php?f=2

Thank you very much.
I will go and see the web. hehe.

I have another question:
in IDE ,the compiling have the same mistakes.
do you know how to use “-lsocket” and something like that to link the library. Thanks for reply!
Are you Chinese too? :slight_smile:

Based on the discussion here, it seems you can add -lsocket to LIBS