Compilation/inclusion problems on IntelMac


#1

Hello all. I have this project that uses Juce. On a PPC G5 machine my project builds fine, and there are no problems concerning Juce. However, compiling the very same project on an IntelMac, I get the following:

error: ‘Boolean juce::Button()’ should have been declared inside ‘juce’

The error pops up, when compiling one of my own files, and clicking it, I’m taken to the following:

/*
File: HIToolbox/Events.h

<…>
extern Boolean
Button(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;

  • It seems like some declaration is either overridden from/in the SDK on the IntelMac, where the PPC has a different SDK, and thus no problems. This is just guesswork though.

Has anyone had similar problems - and maybe a solution? Huge thanks in advance,

-A


#2

I use an intel mac all the time and have never seen that.

Looks like you’re including the mac headers yourself, after including juce, which would explain why the macro breaks it. If you’re going to do that kind of thing you’ll probably need to use the juce_WithoutMacros.h file instead.


#3

That seems very reasonable… I know the mac headers are included in a framework, that the project also includes and links against, so that’s definetly a posibility. Actually, come to think of it, there has been a problem when compiling the same project for PC, where the headers should be included in a different order - but with a very different error as the result.

Thanks a bunch, I can hopefully submit a “success” post soon… :slight_smile:

-A


#4

Does the ssequence, in which include directories are serched, have any influence ? Or is it simply the order of which they are included in the source files that matters ?

  • Eigil

#5

It’s only the order that you include them that matters.


#6

Yep, that seems to do the trick… Thanks a bunch :slight_smile:

-A


#7