Error: Undefined Symbol ..... First referenced in file......

Hi,
I am working with Solaris 5.9 and I am newbie in Socket programming and I stated working with socket programming and I copyed a simple client & server program from a website which I am attaching with this and when I am compiling these files.I am getting the error--

Please Help me to solve it :confused::confused::confused::confused:

Thanks in Advance ....

Linux doesn't usually require you to add "-lsock" to the gcc command, but in this case, you are doing something a little strange. Are you building from an RPM source? Are you building for a different system than what you are using? Try adding -lsock. If this doesn't work, run gcc with "-v" option and post output.