# Winsock.h has already been included : OSC block Visual Studio 2015

**URL:** <https://discourse.libcinder.org/t/winsock-h-has-already-been-included-osc-block-visual-studio-2015/1139>\
**Category:** Using Cinder\
**Created:** [April 25, 2018, 7:30pm UTC](https://discourse.libcinder.org/t/winsock-h-has-already-been-included-osc-block-visual-studio-2015/1139 "2018-04-25T19:30:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eight\_io](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/eight_io/32/57_2.png) [@eight\_io](https://discourse.libcinder.org/u/eight_io)\
**Post date:** [April 25, 2018, 7:30pm UTC](https://discourse.libcinder.org/t/winsock-h-has-already-been-included-osc-block-visual-studio-2015/1139/1 "2018-04-25T19:30:40Z")

</div>

Trying to add OSC sender to my app based on Cinder-KCB2 block.

After adding osc paths into the project settings, and including Osc.h into my app, I get a fatal error

1\>C:\Users\eight\_io\devel\cinder\_0.9.1\_vc2013\include\asio/detail/config.hpp(300): warning C4005: ‘ASIO\_ERROR\_CATEGORY\_NOEXCEPT’: macro redefinition  
1\> C:\Users\eight\_io\devel\cinder\_0.9.1\_vc2013\include\asio/detail/config.hpp(286): note: see previous definition of ‘ASIO\_ERROR\_CATEGORY\_NOEXCEPT’  
1\>C:\Users\eight\_io\devel\cinder\_0.9.1\_vc2013\include\asio/detail/socket\_types.hpp(24): fatal error C1189: #error: WinSock.h has already been included  
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Google tells me to add

#define WIN32\_LEAN\_AND\_MEAN

before

#include \<windows.h\>

but that does not fix the error.

I also confirmed all my project settings against Osc’s SimpleReceiver sample (which works), but to no avail.

I would appreciate any pointers as to how to fix this.

Thanks!

–8

---

<div class="post-metadata">

**Author:** ![eight\_io](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/eight_io/32/57_2.png) [@eight\_io](https://discourse.libcinder.org/u/eight_io)\
**Post date:** [April 25, 2018, 8:08pm UTC](https://discourse.libcinder.org/t/winsock-h-has-already-been-included-osc-block-visual-studio-2015/1139/2 "2018-04-25T20:08:33Z")

</div>

Well, It turns out I had a bunch of includes I did not see (I am new to windows and visual studio), after removing those, including windows.h – everything compiles.

Sorry for the noise.
