differ between linux and solaris in socket programming
I have written a echo server and client on linux, and they run well.
But when I copy these files on solaris , and compiled them, there come some errors. It said that " socket, accept , bind ,listen not defined" . I have used "#include <sys/socket.h>" to import these functions. Does these functions not be defined in sys/socket.h ? Thanks |
You need to link with the network libraries, add these options to your command:
Code:
... -lnsl -lsocket |
Thank you jlliagre .
|
All times are GMT -5. The time now is 05:55 PM. |