#include "stdafx.h" #include <iostream> #include <boost/asio.hpp> #include <conio.h> #include <stdio.h> #include <fstream> #include <string> using namespace std; // ... int main() { boost::asio::ip::tcp::iostream stream; stream.expires_from_now(boost::posix_time::seconds(60)); // ... system("pause"); return 0; }
What a mistake
'Error 3 error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAABVerror_category@12@XZ) referenced in function "public: __thiscall boost::system::error_code::error_code(void)" (??0error_code@system@boost@@QAE@XZ) c:\Users\Gen\documents\visual studio 2012\Projects\ConsoleApplication2\ConsoleApplication2\ConsoleApplication2.obj core2 Error 4 error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAABVerror_category@12@XZ) referenced in function "void __cdecl boost::system::'dynamic initializer for 'errno_ecat''(void)" (??__Eerrno_ecat@system@boost@@YAXXZ) c:\Users\Gen\documents\visual studio 2012\Projects\ConsoleApplication2\ConsoleApplication2\ConsoleApplication2.obj core2 Error 5 error LNK1120: 2 unresolved externals c:\users\gen\documents\visual studio 2012\Projects\ConsoleApplication2\Debug\core2.exe 1 1 core2'