ofxNice build example

I’m trying to create a simple p2p program so i have already setup a turn server and i would like to use the libnice in order to have the signalling between the 2 peers.

Since i want to make my project cross-platform i decided to use OpenframWorks (as i many other project i’ve done) and found the ofxNice addon.

So i have the ofxNIce addon unpack and trying to build the example on OSX 10.9.
After many error fixing i end up with a compilation error of

glib-object.h not found.

So my questing here is
Do i need to build the glib2 for OSX in order to have this addon or am i doing something really wrong?

Any suggestion except from using the ofxNice addon ??
Also i only want to send messages (strings) between the 2 peers.

ohw are you adding the addon? if you use the project generator it should work right away

No i have a bigger project already created with many other addons and i am adding ofxNice.
By the way i am using opeframeworks 0.8.4

you can always re-run the project generator over a project, as long as you add all the addons again it should do the right thing.

make a copy first before trying just in case : )

otherwise check addons_config.mk inside ofxNice for instructions on how to setup the addon for each platform

I have created a new simple project with the procetGenerator includeing the ofxNice addon, But still the build fails due the <glib-object.h> not found.

Should I install glib2 or/and Gstreamer??

oh yes i think you might need to install gstreamer. follow the steps in ofxGStreamer to install the correct version

Ok i’ve installed gstreamer and manage to build the example project of ofxNice without any compilation errors but on Runtime
i have a memory violation.

Specifically:

Form the testApp.cpp of ofxNice

void testApp::setup(){
agentServer.setup(true,NULL,NICE_COMPATIBILITY_RFC5245);
agentServer.setStunServer("77.72.174.165",3478);
streamServer->setup(agentServer,1);  <- on this function call i got a memory violation 
 .
 . 
 .
}

Posting also the above setup method

void ofxNiceStream::setup(ofxNiceAgent & agent, int numberComponents){

    this->agent = &agent;     <--ERROR occurs here!!!!
    this->numberComponents = numberComponents;

   streamID = nice_agent_add_stream(agent.getAgent(),numberComponents);
   if (streamID == 0)
       ofLogError(logName) << "Failed to add stream";
}

I don’t get why i have memory errors??