Why does the following code output "Unknown error"? I expect some other message like "operation timed out" or other descriptive error.
OS: Windows 7 boost: 1.57
#include <iostream>
#include "boost/system/system_error.hpp"
void main()
{
boost::system::error_code ec = make_error_code(boost::system::errc::timed_out);
auto message = ec.message();
std::cout << message << std::endl;
}
Suggest you check include paths, library paths and project settings.
I have corrected the program (main must return an int) and compiled under clang:
command line:
result:
My boost installation is installed to the prefix ${HOME}/local