在solaris 10上进行socket编程 编译没有问题 连接时出了错
g++ -o Tex MainWork.o ClientSock.o
Undefined first referenced
symbol in file
__xnet_connect ClientSock.o
__xnet_socket ClientSock.o
gethostbyname ClientSock.o
ld: fatal: Symbol referencing errors. No output written to Tex
collect2: ld returned 1 exit status
make: *** [Tex] Error 1
单个文件都编译过了,最后连接的时候 却出现了未定义的符号
怎么回事??
------解决方案--------------------g++ -o Tex MainWork.o ClientSock.o -lsocket