Can't get syphon to work in OF. header file not found

Just like I said above, when I try to compile a project with Syphon, it tells me Syphon.h not found. I’ve tried for hours to correct this and can’t recall all of the different ways I attempted.

So, I have the latest xCode and latest OF. I can get the example to run if I compile it as a 32-bit app. I just can’t create a new project and add in the Syphon files without getting this error.

Apparently I can’t upload pictures so here: http://graysonearle.com/stuff/photos/prob.png

What else can I tell you? I’m new to xCode and OF but feel at home with C++.

Did you add the framework to the Build Phase? And to the framework search path in Build Settings?

hello,

did you follow the suggestions to add syphon framework to your project ?
also did you try to build the latest project generator as it fixes the extern framework adding issue.

Thanks for the suggestions. The new generator does not work for Syphon unfortunately, as noted in the GitHub doc (and as I have learned first hand ; )

I added the framework and the search path, and now I get a new set of even more errors, oh boy!

And if I change the architecture to 64 bit, I get “unknown type name QTVisualContextRef”

Did you clean the build before re-building it ?

Also, you may need to add SyphonNameboundClient.m manually from ofxSyphon lib directory as it sometimes fail to add it automatically. Check it in your sources tree.

This is not an ofxSyphon issue. the Project Generator from 0.8.4 doesn’t work for syphon but a fix is being released for 0.9. you need to build it though, but will soon be included in the latest builds

https://github.com/openframeworks/openFrameworks/pull/4170

Hey Gallo,

Just tried cleaning/re-building for both architectures, no dice. I see that …Client.m was not in the libs/Syphon/src directory so I right clicked and did Add File… and now it looks like this:

Now I get even more errors:

Also I wish I could compile the new OF, but seeing as how I can’t even get Syphon running with about 8 hours so far (and the help of an experienced xCoder) I doubt I could get that working, hah.

you can just build the Project Generator from the latest fix release. Grab the source code then launch the build script included.

I had really hard time making ofxSyphon to work properly and i know it can get tricky.
I suggest you create a new project with the project generator from version 0.8.4 with all necessary addons

then copy your source code and set ofxSyphon custom parameters as suggested above. This should be good.

Just tried with the nightly build, I get a missing Syphon.h file again, added it to search path and frameworks, then I get the same errors as before. :confused:

the fix is not included in the latest nightly yet. You need to build it from source.

anyway just follow the steps above and you should be good to go

Are you able to compile the examples included in ofxSyphon? If so, then can you just copy one of those projects and build from there?

Unfortunately as I suspected, attempting to build the Project Generator from source threw all kinds of errors.

As for using the example file, I guess I have three concerns. 1) Plain frustration as to why it won’t work the proper way 2) It’s a little disorganized as it sits in a somewhat buried example folder outside of myApps 3) Most importantly, I also require OSC and can’t seem to figure out how to add that into an existing project (many of the same types of errors)

In the hope of ending this nightmare… maybe if I show my steps one by one someone can point out what went wrong. I’ve done this a million different ways by this point, but I’ll try to follow the instructions I found online as closely as possible.

  1. Use project gen to make a new project with OSC enabled (not Syphon)

  2. This is how my folder structure looks; I copied the ofxSyphon folder from the github download into the addons folder of my OF install.

  3. It says on the GitHub to also copy the ofxSyphon folder into my new project folder, so I did that as well.

  4. When I open the project up in xCode it compiles and runs at this point. Here is what my structure looks like. Notice there is no ofxSyphon folder.

  5. So I add it by right clicking and say “add files to” but the folder appears blue instead of yellow.

  6. I navigate to copy build phase to add the framework. It doesn’t show up in the list at first.

  7. So I add it by manually searching for the .framework file that is in the ofxSyphon folders that are inside my project folder.

  8. I add the absolute path for the framework to the framework search path as well as a relative search path for good measure.

  9. Add #include Syphon.h to my app header. Try to build, get “Syphon.h not found”

  10. Add header search paths for the Syphon headers that exist outside my project file (I’m confused on when to reference the files from the folder inside my project folder and when to access the files from the addons folder of OF)

  11. Same error

I noticed a few errors in your outline above, so I made a video of adding ofxSyphon to an empty OF 008.4 example.

https://vimeo.com/135530973

It’s hard to read the framework search path. It is: “$(SRCROOT)/…/…/…/addons/ofxSyphon/libs/Syphon/lib/osx”

2 Likes

What i usually do :

  • copy ofxSyphon addon directory to the addons directory without examples
  • note : i don’t copy examples and never compiled them, i usually delete them
  • create a new project with project generator WITH ofxSyphon addon included
  • open the project
  • drag an drop the framework file from the addon directory to the project tree. Check “add to target” and “create group”
  • drag and drop the framework from the project tree to the “copy files” in build phases
  • sometimes i have to add SyphonNameboundClient.m manually in the addon directory in the project tree

this is all for me

It worked! Thank you so much (both of you) for your time and that video. One question: Why reference the .framework file from the addons folder when there is one inside your project folder?

Only because I didn’t copy the addon into my project folder. :smile:
You could copy it into your project folder and reference from there if you wanted.