Linking OpenFrameworks with an existing project using Juce


Hello,

I'm working on a project using juce. But for one part of the project, it would be usefull to use OpenGLFrameworks. I read that normally it wouldn't be a problem.

So I tryied to find some informations without any luck, so I tried to link OF to my project by myself. Unfortunatly I failed.

So what I have:
I'm using Xcode 5 on OS X 10.9
I have an Xcode project I setted up to work with the Juce framework. I wrote the code using this framework. 
But now, I want to use OpenFrameworks for another part of the app I’m writing. So I need to link OF to the existing Xcode project.
Up now, I used the project generator to build a project to help me to link OF to my project. 


Here are the steps I did:
1. I place the folder “libs” and “addons” so that they are at ../../.. to the .xcodeproj files of my project.
2. I compared what was in the project navigator. I added the files (project.xconfig (copied from the generated project), coreOF.xconfig, and the openFrameworksLib.xcodproj) to the project. So I suppose the paths are correct: 
3. I compared the linked libraries and frameworks between the two and I added the missing ones to my project.
I did the same for the stuff under the build phases and I added the Target Dependancy “OpenFrameworks (OpenFrameworks Lib). I also copied the script, and make sure that I have the same in the “Compile Sources” and “Link Binary with Libraries” sections.
4. I compared the build settings. I copy-merged the value in “Other Linker Flags”, “Frameworks Search Paths”, “Header search paths”, “library search paths”, set YES to “Always search user path”. Set the default compiler etc. I checked that it’s the same as in the generated project.

5. I tried to change the base SDK and target to 10.8 in my project instead of 10.9.

The problem:
When I build the project, it fails. I also try it with a new project without Juce, but it also fails.
I always have these errors. It said they are in the code of OF, but I know that’s not the problem. There is certainly a problem with the linking. What could I miss, or what could I do wrong?


Here is the error that xcode give me, with an extract of the error log

/Users/Jo/Desktop/testOF-f1/testOF-f2/addons/ofxOsc/libs/oscpack/src/ip/posix/UdpSocket.cpp:131:22: Use of undeclared identifier 'close'
/Users/Jo/Desktop/testOF-f1/testOF-f2/addons/ofxOsc/libs/oscpack/src/ip/posix/UdpSocket.cpp:333:7: Use of undeclared identifier 'pipe'
[…]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h:821:66: Use of undeclared identifier 'true'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h:821:73: Use of undeclared identifier 'false'
[…]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/dispatch/data.h:198:16: Block pointer to non-function type is invalid
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/dispatch/data.h:198:14: Function cannot return function type 'int (dispatch_data_t, size_t, const void *, size_t)'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/dispatch/data.h:226:43: Unknown type name 'dispatch_data_applier_t'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/dispatch/data.h:226:20: Function cannot return function type 'bool' (aka 'int (int)')
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGGeometry.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGGeometry.h:124:35: Function cannot return function type 'bool' (aka 'int (int)')
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers/CGGeometry.h:129:33: Function cannot return function type 'bool' (aka 'int (int)')
[…]