Linking OF with a Juce Project [xcode]

Hello!

I working on a project for my studies. Now I have a working app writing using the Juce framework mainly for the GUI working on every platform.

Now I’m looking to use OF for other stuff that Juce doesn’t allow to do. So what I have to do is to add OF to my project.

I searched how to linked OF to an existing project in Xcode. I found questions about how to do it but not the solution. I try by myself comparing the setting of the emptyProject and inspiring myself about it, but I have a lot of error. Mainly because it can’t find the headers.

So for now I do not think about keeping it multi-platform as it is not the priority for now. I need to import OF in my project, but I’m stuck. I try for hours today, without any luck :(.

Do you have any advise, help to offer?

Thanks you in advance !

Hello,

So I will give you a bit more informations about what I have in xcode and what I tried.

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.
    Finally I have this:

  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)')  
[
]