Compiling errors in Xcode 4


#1

Hello. I cloned the lastest version and tried to compile some of the examples, but every time I got a parse issue error.
Using the HelloWorld project as reference, here is what happens every time I try to compile any example:

HelloWorld
/PROYECTOS/mysonictoys/CODE/juce/extras/example projects/Builds/MacOSX/…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h
…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:157:27: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:158:41: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:159:38: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:160:37: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:161:58: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:187:27: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:188:41: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:189:38: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:190:37: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:191:58: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:211:27: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:212:41: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:213:38: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:214:37: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:215:58: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:157:27: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:158:41: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:159:38: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:160:37: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:161:58: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:187:27: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:188:41: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:189:38: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:190:37: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:191:58: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:211:27: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:212:41: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:213:38: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:214:37: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h:215:58: error: expected ‘;’ at end of declaration list [3]

/PROYECTOS/mysonictoys/CODE/juce/extras/example projects/Builds/MacOSX/…/…/JuceLibraryCode/modules/juce_gui_basics/…/…/…/…/…/modules/juce_gui_basics/filebrowser/…/widgets/juce_TextEditor.h
…/…/JuceLibraryCode/modules/juce_gui_basics/…/…/…/…/…/modules/juce_gui_basics/filebrowser/…/widgets/juce_TextEditor.h:409:39: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_gui_basics/…/…/…/…/…/modules/juce_gui_basics/filebrowser/…/widgets/juce_TextEditor.h:412:63: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_gui_basics/…/…/…/…/…/modules/juce_gui_basics/filebrowser/…/widgets/juce_TextEditor.h:418:44: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_gui_basics/…/…/…/…/…/modules/juce_gui_basics/filebrowser/…/widgets/juce_TextEditor.h:409:39: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_gui_basics/…/…/…/…/…/modules/juce_gui_basics/filebrowser/…/widgets/juce_TextEditor.h:412:63: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_gui_basics/…/…/…/…/…/modules/juce_gui_basics/filebrowser/…/widgets/juce_TextEditor.h:418:44: error: expected ‘;’ at end of declaration list [3]

/PROYECTOS/mysonictoys/CODE/juce/extras/example projects/Builds/MacOSX/…/…/JuceLibraryCode/modules/juce_gui_extra/…/…/…/…/…/modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.h
…/…/JuceLibraryCode/modules/juce_gui_extra/…/…/…/…/…/modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.h:155:44: error: expected ‘;’ at end of declaration list [3]

…/…/JuceLibraryCode/modules/juce_gui_extra/…/…/…/…/…/modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.h:155:44: error: expected ‘;’ at end of declaration list [3]

fatal error: too many errors emitted, stopping now [-ferror-limit=]

fatal error: too many errors emitted, stopping now [-ferror-limit=]

In file included from …/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/juce_graphics.h:143:

In file included from …/…/JuceLibraryCode/modules/juce_graphics/juce_graphics.h:4:

In file included from /PROYECTOS/mysonictoys/CODE/juce/extras/example projects/Builds/MacOSX/…/…/Source/…/JuceLibraryCode/JuceHeader.h:20:

In file included from /PROYECTOS/mysonictoys/CODE/juce/extras/example projects/Builds/MacOSX/…/…/Source/MainComponent.h:26:

In file included from /PROYECTOS/mysonictoys/CODE/juce/extras/example projects/Builds/MacOSX/…/…/Source/MainComponent.cpp:25:

Expected ‘;’ at end of declaration list in /PROYECTOS/mysonictoys/CODE/juce/extras/example projects/Builds/MacOSX/…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h
In file included from …/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/juce_graphics.h:143:
In file included from …/…/JuceLibraryCode/modules/juce_graphics/juce_graphics.h:4:
In file included from /PROYECTOS/mysonictoys/CODE/juce/extras/example projects/Builds/MacOSX/…/…/Source/…/JuceLibraryCode/JuceHeader.h:20:
In file included from /PROYECTOS/mysonictoys/CODE/juce/extras/example projects/Builds/MacOSX/…/…/Source/MainComponent.h:26:
In file included from /PROYECTOS/mysonictoys/CODE/juce/extras/example projects/Builds/MacOSX/…/…/Source/MainComponent.cpp:25:
Expected ‘;’ at end of declaration list in /PROYECTOS/mysonictoys/CODE/juce/extras/example projects/Builds/MacOSX/…/…/JuceLibraryCode/modules/juce_graphics/…/…/…/…/…/modules/juce_graphics/images/juce_ImageFileFormat.h

Please help…I compiled the same project in Windows and worked fine.

Thank you


#2

juce_ImageFileFormat.h:157:27 is an “overide” statement, so it looks like your compiler’s not c++11 compliant. But that makes no sense because if you’re using the latest Xcode (which you are, right?) then Clang will support this. And even if it you’re using an old pre-C++11 compiler, then it should correctly set the JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL flag to avoid any problems.

You could probably avoid it by explicitly setting JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL=0, but you really shouldn’t have to. I’d be interested in learning exactly what version of clang or gcc you’re running.


#3

Solved. I was using Xcode 4.0 . After upgrading to Xcode 4.2 every went ok.
Thanks.