git clone
http://github.com/ParkSeungwon/tcpip && cd tcpip && make
Can anyone test compile my program? In my case it fails. What is the problem?
You will need to 'git clone' to download my program.
I know it is too much to ask to others. I am sorry.
zezeon@Kylin:~/Programming/tcpip$ make
g++ -c tcpip.cc -g -std=c++11
g++ -o cl cl.o tcpip.o -lpthread
g++ -c sv.cc -g -std=c++11
In file included from sv.cc:4:0:
tcpip.h:33:29: error: ‘void Server::test(T) [with T = main()::<lambda(std::__cxx11::string)>]’, declared using local type ‘main()::<lambda(std::__cxx11::string)>’, is used but never defined [-fpermissive]
template <typename T> void test(T functor);
^
Makefile:15: recipe for target 'sv.o' failed
make: *** [sv.o] Error 1
1 2 3 4 5 6 7 8 9 10
|
int main()
{
auto f = [](string s) {
string str = "[from server] ";
str += s + " : " + to_string(s.size());
return str;
};
Server sv;
sv.start(f);
}
|