title: 'CreateEvent': is not a member of '`global namespace'' in ASIO
body: <p>I'm working on a project that includes ASIO.  I added the library and header files, but when I have a file that includes <code>asio.hpp</code>, I get the following errors:</p>
  
  <pre><code>1&gt;c:\users\me\documents\of_v0.9.1_vs_release\addons\ofxasio\libs\asio-1.10.6\include\asio/detail/config.hpp(229): warning C4005: 'ASIO_ERROR_CATEGORY_NOEXCEPT': macro redefinition (compiling source file src\ofApp.cpp)
  1&gt;  c:\users\me\documents\of_v0.9.1_vs_release\addons\ofxasio\libs\asio-1.10.6\include\asio/detail/config.hpp(215): note: see previous definition of 'ASIO_ERROR_CATEGORY_NOEXCEPT' (compiling source file src\ofApp.cpp)
  1&gt;c:\users\me\documents\of_v0.9.1_vs_release\addons\ofxasio\libs\asio-1.10.6\include\asio/detail/impl/win_thread.ipp(59): error C2039: 'CreateEvent': is not a member of '`global namespace'' (compiling source file src\ofApp.cpp)
  1&gt;c:\users\me\documents\of_v0.9.1_vs_release\addons\ofxasio\libs\asio-1.10.6\include\asio/detail/impl/win_thread.ipp(59): error C3861: 'CreateEvent': identifier not found (compiling source file src\ofApp.cpp)
  1&gt;c:\users\me\documents\of_v0.9.1_vs_release\addons\ofxasio\libs\asio-1.10.6\include\asio/detail/impl/win_thread.ipp(69): error C2039: 'CreateEvent': is not a member of '`global namespace'' (compiling source file src\ofApp.cpp)
  1&gt;c:\users\me\documents\of_v0.9.1_vs_release\addons\ofxasio\libs\asio-1.10.6\include\asio/detail/impl/win_thread.ipp(69): error C3861: 'CreateEvent': identifier not found (compiling source file src\ofApp.cpp)
  1&gt;c:\users\me\documents\of_v0.9.1_vs_release\addons\ofxasio\libs\asio-1.10.6\include\asio/detail/impl/win_iocp_handle_service.ipp(42): error C2039: 'CreateEvent': is not a member of '`global namespace'' (compiling source file src\ofApp.cpp)
  1&gt;c:\users\me\documents\of_v0.9.1_vs_release\addons\ofxasio\libs\asio-1.10.6\include\asio/detail/impl/win_iocp_handle_service.ipp(42): error C3861: 'CreateEvent': identifier not found (compiling source file src\ofApp.cpp)
  </code></pre>
  
  <p>Research online suggests that this is possibly due to me needing to redefine <code>_WIN32_WINNT</code> to the proper version number; however, I've tried a few versions numbers and either get an <code>incompatible version of Windows error</code> or no resolution to the above error.</p>
  
  <p>I also found documentation on the Windows Dev site:</p>
  
  <p><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms682396%28v=vs.85%29.aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/windows/desktop/ms682396%28v=vs.85%29.aspx</a></p>
  
  <p>and I saw that it requires <code>WinBase.h</code> for older versions of Windows, and <code>Synchapi.h</code> for Windows 8.  I'm running Windows 8.1; but unfortunately including neither of these options worked.</p>
  
  <p>Does anyone have suggestions for what might be causing this error?</p>
  
  <p>The entire source for the project is here: <a href="https://github.com/morphogencc/ofxAsio/tree/master/example-udpreceiver" rel="nofollow">https://github.com/morphogencc/ofxAsio/tree/master/example-udpreceiver</a></p>