Compiling ofxOsc and ofxDarknet together

Currently struggling to compile a project from the project generator which has both ofxOsc and ofxDarknet. I get several Use of undeclared identifier errors in UdpSocket.cpp in ofxOsc, I suspect because something in the darknet libs is interfering with these four methods (read, close, write, pipe). See screenshot below. If anyone has seen an error like this or knows what kind of changes need to be made in ofxDarknet to make it compatible with ofxOsc, please let me know. Trying to make a DarknetOSC of sorts.

Same for Linux.
but for windows I’ve no issues…

Would it work using the networkTcp or networkUdp examples instead of OSC?

I have two questions about the Darknet code :

  1. Isn’t it a bad idea to #define generic words like BOX_H, DATA_H, LIST_H or UTILS_H like they do in Wouldn’t that clash with other source file added to the project using the same defines?
  2. What about variable names like tree, layer, image or box found in How are collisions with similar names in other files avoided without using namespaces?

Thank you :slight_smile:

1 Like