ofxOSC issues (winsock2.h not found)

Hi,

I read almost all posts about ofxOSC issues and I still have one that is completely blocking.

I added all in my header search path etc.
and I figured out this:

winsock2.h file not found and yes, it is not in the folder.

where can I find it ?
basically, I just used the base 93 version of OF including ofxOSC addons

Any help?
This is very urgent.
Currently finishing in the rush an installation for MoTA :cry:

Any help would be appreciated

Julien

Hi Julien!

Its usually pretty good to include info about your platform when asking for help with these types of things.

Is this on Windows? If so which version of Windows?
Are you using Visual Studio as your IDE?

A good test to see if this is an issue with OF, your setup or your project is to try running the oscReceiveExample in examples/addons/ - if that builds and runs fine for you then it might be an issue with the way you setup your project.

If you are using Windows and Visual Studio - try using the Project Generator included in the 0.9.3 release ( in the root of the OF folder projectGenerator-vs/ ) to make a project adding the ofxOsc addon.

Its fairly hard to add addons to Visual Studio without using the Project Generator.

I hope that helps!
Theo

1 Like

Hi theo and TOTAL apologize.

Running OSX 10.11.6
OF 93

example is working very fine.
when I “add” the addon to my project, I do that:

  • drag’n’drop to addons group
  • it asks 'added folder (I choose “create group”)
  • it asks “add to target” I try to check or not check the checkbox

same OF installation folders.
same myApps folder.

  • in one folder: the osc sender example, working
  • in another folder: my example, complaining about the winsock2.h :’(

Ahh okay.
Thanks for the info!

Easy fix actually.

browse the ofxOsc folder in the Xcode project and remove any folders in ofxOsc/libs/ or ofxOsc/src/ that have win/ in the name.

The problem is when you drag and drop it adds Windows specific code which can’t compile on OS X

you mean within xcode like … removing references ? right?

So I had to do 2 things to solve completely this:

  • in Xcode, remove the reference to the folder named win32 and located in ofxOSC/libsoscpack/src/ip
  • in Xcode, add all these folder to the Header Search in Build Settings:

…/…/…/addons/ofxOsc/libs
…/…/…/addons/ofxOsc/src
…/…/…/addons/ofxOsc/libs/oscpack/src/ip
…/…/…/addons/ofxOsc/libs/oscpack/src/ip/posix
…/…/…/addons/ofxOsc/libs/oscpack/src
…/…/…/addons/ofxOsc/libs/oscpack/src/osc
…/…/…/addons/ofxOsc/libs/oscpack

Thanks a lot for the first one I never found during the previous … 2 hours :’(

Best,
Julien

Definitely a good reason to use the project generator! :slight_smile:
Some addons really don’t work well when dragged in.

Glad you got it working!
Theo

1 Like

but can I use it on osx?

hello,

sure. Have a look at “projectGenerator-osx” in the root folder

1 Like

sorry for not having spotted that before.
I will use that for sure next times.