当前位置: 技术问答>linux和unix
在solaris 10上进行socket编程 编译没有问题 连接时出了错
来源: 互联网 发布时间:2016-01-09
本文导语: g++ -o Tex MainWork.o ClientSock.o Undefined first referenced symbol in file __xnet_connect ClientSock.o __xnet_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
单个文件都编译过了,最后连接的时候 却出现了未定义的符号
怎么回事??
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