gcc - C++ compile issue -
meme@ubuntu:~/data$ g++ udpechoserver.cpp practicalsocket.cpp -o udpskserv -lsocket -lnsl -mt
i trying compile @ compiler ubuntu , receive error
cc1plus: error: unrecognized command line option ‘-mt’
may ask -mt , try google can't find information.
if try omit -mt parameter error
practicalsocket.cpp: in constructor ‘socketexception::socketexception(const string&, bool)’: practicalsocket.cpp:33:38: error: ‘strerror’ not declared in scope practicalsocket.cpp: in function ‘void filladdr(const string&, short unsigned int, sockaddr_in&)’: practicalsocket.cpp:47:32: error: ‘memset’ not declared in scope practicalsocket.cpp: in member function ‘void socket::setlocalport(short unsigned int)’: practicalsocket.cpp:119:42: error: ‘memset’ not declared in scope practicalsocket.cpp: in static member function ‘static short unsigned int socket::resolveservice(const string&, const string&)’: practicalsocket.cpp:153:32: error: ‘atoi’ not declared in scope practicalsocket.cpp: in member function ‘void udpsocket::disconnect()’: practicalsocket.cpp:291:40: error: ‘memset’ not declared in scope
both std::memset
, std::strerror
declared in <cstring>
header, need #include
one.
and gcc not have -mt
option.
Comments
Post a Comment