websocketpp icon indicating copy to clipboard operation
websocketpp copied to clipboard

v0.6.0 VS2010 compile error (common\system_error.hpp(64))

Open amdei opened this issue 11 years ago • 3 comments

When building simple program using VisualStudio 2010 I got:

....\websocketpp\common\system_error.hpp(64): error C2873: 'std::errc' : symbol cannot be used in a using-declaration

Code there is: 63: #ifdef WEBSOCKETPP_CPP11_SYSTEM_ERROR 64: using std::errc; 65: using std::error_code;

Commenting out this line solve the issue.

amdei avatar Jun 30 '15 16:06 amdei

@thoys \websocketpp-master\websocketpp-master\websocketpp\common\system_error.hpp(65): error C2873: 'std::errc' : symbol cannot be used in a using-declaration

getting this error on microsoft visual studio 2012 how to solve this? i tried the fix as you suggested for 2010 (#if (_MSC_VER != 1700) using std::errc;) but its not working on 2012

shasanka avatar Jun 20 '17 09:06 shasanka

Hi @shasanka Please change using std::errc; to using namespace std::errc;

This changes solved my problem.

erhanbaris avatar Jun 28 '17 07:06 erhanbaris

hi @thoys i tried changing using std::errc to using namespace std::errc, but that doesn't solve the problem.

shasanka avatar Jul 25 '17 11:07 shasanka