
Hi. i just test using giallo .but it has some errors: giallo error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) 已经在 giallo.obj 中定义
// giallo.cpp : ¶šÒå¿ØÖÆÌšÓŠÓóÌÐòµÄÈë¿Úµã¡£ // #include "stdafx.h" #include <string> #include <boost/net/socket/socket.hpp> #include <boost/net/socket/ip4.hpp> void server(); int _tmain(int argc, _TCHAR* argv[]) { server(); return 0; } void server() { boost::net::socket::socket socket; boost::net::socket::socket_errno err; boost::net::socket::ip4::tcp_protocol protocol; boost::net::socket::ip4::address addr; addr.port(3235); addr.ip("127.0.0.1"); err=socket.open(protocol, boost::net::blocking_synchronisation() ); std::cout<<"opened-"<<err<<std::endl; err=socket.bind(addr); std::cout<<"bind-"<<err<<std::endl; err=socket.listen(); std::cout<<"listen-"<<err<<std::endl; boost::net::socket::socket connection; err=socket.accept(connection, addr); char buf[100]; int n=connection.recv(buf,100); }