C++编译问题

use*_*011 3 c++ gcc

meme@ubuntu:~/Data$ g++ UDPEchoServer.cpp PracticalSocket.cpp -o udpskserv -lsocket -lnsl -mt
Run Code Online (Sandbox Code Playgroud)

我试图在我的编译器ubuntu编译,我收到此错误

cc1plus: error: unrecognized command line option ‘-mt’
Run Code Online (Sandbox Code Playgroud)

我可以问什么是-mt,我尝试谷歌但无法找到任何信息.

如果我尝试省略-mt参数,我会收到此错误

PracticalSocket.cpp: In constructor ‘SocketException::SocketException(const string&, bool)’:
PracticalSocket.cpp:33:38: error: ‘strerror’ was not declared in this scope
PracticalSocket.cpp: In function ‘void fillAddr(const string&, short unsigned int, sockaddr_in&)’:
PracticalSocket.cpp:47:32: error: ‘memset’ was not declared in this scope
PracticalSocket.cpp: In member function ‘void Socket::setLocalPort(short unsigned int)’:
PracticalSocket.cpp:119:42: error: ‘memset’ was not declared in this scope
PracticalSocket.cpp: In static member function ‘static short unsigned int Socket::resolveService(const string&, const string&)’:
PracticalSocket.cpp:153:32: error: ‘atoi’ was not declared in this scope
PracticalSocket.cpp: In member function ‘void UDPSocket::disconnect()’:
PracticalSocket.cpp:291:40: error: ‘memset’ was not declared in this scope
Run Code Online (Sandbox Code Playgroud)

Som*_*ude 9

双方std::memsetstd::strerror在声明<cstring>标题,你需要#include的那一个.

海湾合作委员会没有-mt选择权.