Build problem using Xcode 6


#1

I get a lot of these, and searching the forums I didn't find anything: 

/Applications/Xcode6-Beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Finder.h:240:3: error: 

      unknown type name 'Point'

  Point               location;               /* File's location in the folder */

This is when juce_audio_basics.mm is compiled.

Ideas ?

Edit: Btw. Same problem when compiling the JuceDemo with Xcode 6.

 


#2

Huh? I've been using Xcode 6 for weeks, and never saw anything like that. Any ideas how I might reproduce it?


#3

I've seen this as well, happens if I compile the JUCE demo. I think the fix is to add a dummy Point definition around the Accelerate include on line 60 of juce_audio_basics.cpp

#if (JUCE_MAC || JUCE_IOS) && JUCE_USE_VDSP_FRAMEWORK
 #define Point CarbonDummyPointName // (workaround to avoid definition of "Point" by old Carbon headers)
 #include <Accelerate/Accelerate.h>
 #undef Point
#else
 #undef JUCE_USE_VDSP_FRAMEWORK
#endif

Think it happens if you use the 10.10 SDK (which is also the default on Xcode 6).


#4

Ah, must be a 10.10 thing, I'm still using v9, ta.


#5

I think base issue was that my deployment target was set to 10.6, which was invalid. Setting it to 10.7 made it get through that loophole anyway....

Edit: No, that was not it, I went back to Xcode 5 atm with 10.9 SDK and 10.7 deployment target. I'm tired today.


#6

The Xcode update I got today forced me to install the 10.10 SDK. It shows for Finder.h and Quickdraw.h "Unknown type name 'Point' ". What are your plans for compatibility with Yosemite?


#7

Sigh.. Ok, thanks for the heads-up, I've not installed 10.10 yet, but will do in the next day or two..


#8

I don't think this is dependent on the OS, you can still build against 10.10 on OSX 10.9 can't you? That's were I first saw the problem.

 

@Gandalf458

Does adding that CarbonDummyPointName define I posted in this thread earlier fix the build issues for you?


#9

Hi, I'm not Gandalf458, but the fix does work. (THANKS!). I had decided to just work with an iPad target until Jules fixed it, but now I can work with a Mac target as well.

I don't believe this was caused by Xcode 6.0 or by Yosemite. I was having no problem with either for a week. This started happening to me after I upgraded to Xcode 6.1, which came out yesterday (mostly adding a bunch more Swift support).


#10

Hi, I just try to re-compile a old(not very) project and at the end I got a error,

 

here is my error:

527:595: execution error: Terminal got an error: Can’t get window 1. (-1728)

 

Someone has any idea?


#11

I'm still having this problem when I try to include accelerate framework: I get errors in Finder.h (with Point class) and in Component.h (with Component class).

Any help?


#12

Did you try my post #3?


#13

If you have to include some frameworks, which somehow depends on CarbonCore (like the Accelerate framework), you have to surround it with 

#define Point CarbonDummyPointName // (workaround to avoid definition of "Point" by old Carbon headers)
#include <Accelerate/Accelerate.h>
#undef Point
​

because Juce uses its own Point and Component type names, and that gives a clash on OS X.

Similarly, if you include something that declares Component, you have to

#define Component CarbonDummyCompName
 //... include some old Carbon headers
#undef Component

 

 


#14

This problem has been introduced by the addition of vImage_CVUtilities.h to the Accelerate framework, which creates a CoreVideo and subsequent CarbonCore dependency. However, it can be safely excluded by defining a preprocessor macro before including Accelerate. Per <vImage/vImage_CVUtilities.h>:

/*!
 *  @define vImage_CVUtilities_h
 *  @abstract Preprocessor symbol to make sure the header is only included once. 
 *  @discussion Set vImage_CVUtilities_h to 1 before including Accelerate headers
 *              to turn this header off. 
 *              You may wish to do that if the inclusion of CoreVideo/CVPixelBuffer.h is
 *              causing problems for your build.
 */

#define vImage_CVUtilities_h 1

The project I'm working on uses vDSP outside of JUCE, and I have successfully added this to the "Preprocessor Macros" project setting in Xcode to solve the matter.

Note: If your project has any namespace collisions with CoreGraphics, it is possible to exclude vImage_Utilities.h in the same fashion.


#15

Hi guys, 

I've created a project using the IntroJucer on OSX 10.9 in Xcode 6, and I'm getting the Parse Issue; "Unknown type name 'Point'" error...

I've tried changing the Deployment target, but the issue persists.

I've looked at the above fixes,  but at this is a new barebones GUI application, I'm not including any frameworks explicitly.

Maybe i'm missing something very obvious...

Jules you said you were running 10.9 but hadn't seen this issue?

 


#16

Nope, I've happily used every version of OSX and Xcode and never had this. What's the full error report (including all include paths)?


#17

phew !  thanks for that  joel -  that sorted out my component.h  crap too 

:)


#18

That's weird.  I've just had this fault.  The only unusual thing I did was to create the jucer file on the PC and then transfer it to the Mac and create the Mac project. Usually I do it the other way around...


#19

And like that … I’ve got the problem again!