Open Daandelange opened 8 years ago
The linker will also need -framework Syphon
Don't know much about Qt Creator so not sure about the framework copy I'm afraid
Hey, thanks for your reply.
Feeding the linker with -framework Syphon
throws an unrecognized linker argument warning, but it links fine with of.frameworks: ['Syphon']
.
For the record, here's an updated .qbs
snippet to get ofxSyphon to compile with QtCreator.
This example works fine with Simple Client.app
.
So I'm back on getting ofxSyphon to work with QtCreator and hopefully resolve this issue, could you give me some insights ?
The issue is about how #include <Syphon/Syphon.h>
is resolved ( in 4 different files).
#include "Syphon.h"
instead works great, but that breaks compilation on Xcode, so I made a compilation flag to make it work without breaking ofxSyphon.Syphon/Syphon.h
can be resolved.
.QBS : of.includePaths: ['../../../addons/ofxSyphon/libs/Syphon/lib/osx/']
cd ofxSyphon/libs/Syphon/lib/osx && ln -s Syphon.framework/Headers Syphon
:
Also, C++ references state that #include <something>
is for system includes (/System/Library/Frameworks/
), while ofxSyphon seems to use a local framework. So shouldn't it be #include "Syphon/Syphon.h"
?
Ok, I found the right solution.
Qt Creator provides a way of setting framework search paths, together with the frameworks.
While oF wraps and documents cpp.frameworks
, there's no trace of frameworkPaths.
But there's a way of setting it trough qt's cpp module directly, and that works !
Also, regarding my last question, #include <Framework/Something.h>
seems to be the way to go for including Apple Frameworks.
Here's an updated example of ofxSyphon working with Qt Creator.
Hey, I'v been trying to compile ofxSyphon with Qt creator instead of Xcode and finally succeeded. :)
Syphon.framework
to/Library/Frameworks
in order to link against it./addons/ofxSyphon/libs/Syphon/lib/Syphon.Framework
to/bin/ofApp/Contents/Frameworks/Syphon.Framework
or copySyphon.framework
to/Library/Frameworks
on the computer you'd like to run your ofApp on.So that's about how far I got, the next step would be using the
Syphon.Framework
from the addons folder rather then from/Library/Frameworks
. Any ideas ? With these lines I couldn't get it to work while [it should](). (even using absolute paths)of.linkerFlags: ['-F../../../addons/ofxSyphon/libs/Syphon/lib/osx']
of.cxxFlags: ['-F../../../addons/ofxSyphon/libs/Syphon/lib/osx']
Including the Syphon.Framework copy step in the Qt build process would be nice too.
(Still looking for better solutions so no PR yet, leaving issue open until then.)