zaphoyd / websocketpp

C++ websocket client/server library
http://www.zaphoyd.com/websocketpp
Other
6.97k stars 1.97k forks source link

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

Open amdei opened 9 years ago

amdei commented 9 years ago

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_SYSTEMERROR 64: using std::errc; 65: using std::error_code;

Commenting out this line solve the issue.

shasanka commented 7 years ago

@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

erhanbaris commented 7 years ago

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

This changes solved my problem.

shasanka commented 7 years ago

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