I am experimenting a project that have ofxOsc involved as well as OpenNI2. When I run a code. I got this error :
socket is a private member of OfxSender
listen_socket is a private member of OfxReceiver
I use Supercollider osc to OF.
I’m running on Mac os x 10.9.2. Xcode Version 5.1.1 (5B1008)
Anybody has any suggestions ? I would be appreciated
You should access socket and listen_socket through the ofxOscSender/Receiver accessor methods, not directly.
Maybe post a code snippit here…?
Thank you so much for the quick response. So sorry I wasn’t clear at first. Here is a code :
void ofxOscSenderReceiver::setup(int listen_port, string send_host, int send_port)
this->socket = (UdpTransmitSocket *) listen_socket;
Am a bit confused - I use the ofxOsc add-on in my project and use the
ofxOscSender classes fine. But I have never seen
ofxOscSenderReceiver before - is this a new class you are writing? Have you already tried using the existing
ofxOscSender classes separately in your app?
I found some doc about ofxSuperCollider: https://code.google.com/p/ofxsupercollider/source/browse/trunk/ofxSuperCollider/src/ofxSCServer.cpp.
At first sight, ofxOscSenderReceiver might be out-of-date with ofxOsc. Probably, some inherited members used to be protected but are now private or so. Anyway, if you look the the following code, you can see that there is an alternative:
ofxSCServer::ofxSCServer(string hostname = "localhost", unsigned int port = 57110)
this->hostname = hostname;
this->port = port;
osc.setup(LISTEN_PORT, hostname, port);
ofAddListener(ofEvents.draw, this, &ofxSCServer::_process);
Without having dug deeper, I’m pretty sure that you can compile your code without ofxOscSenderReceiver.
Just un-define the macro or remove the file from your project.
Hope it helps!