juce_amalgamated.cpp mac


#1

I just updated to the svn tip, now I get errors compiling the juce demo. There are a few occurrences of this line which cause the error in juce_amalgamated.cpp:

This doesn’t look right…


#2

I “corrected”

#include "../../../src/juce_core/basics/juce_StandardHeader. h"

to

#include "../../../src/juce_core/basics/juce_StandardHeader.h"

in juce_mac_NativeHeaders.h. I knocked up an xcode project for the amalgamator and ran that on my juce directory. Now I get

error: 'NSInteger' was not declared in this scope

when building the jucedemo.

So I’m guessing the extra whitespace on that include line is not the only problem…

I’m using Xcode 2.5 building for 10.4.


#3

yeah, not sure what happened there, must have fallen asleep on the spacebar…

I’m not seeing that other error, though - which file’s it in?


#4

[quote=“jules”]yeah, not sure what happened there, must have fallen asleep on the spacebar…

I’m not seeing that other error, though - which file’s it in?[/quote]

Yeah, my theory was you have a pet cat that walked over your laptop…

The NSInteger error is in the amalgamated file in juce_mac_FileChooser.mm.

I thought I’d try building juce lib, now I get a bunch of errors, starting with:

Is this a 10.4/10.5 issue? I’m on 10.4.


#5

I think NSInteger might be 10.5 only:

http://lists.apple.com/archives/objc-language/2008/Jun/msg00142.html

I got past the LSOpenCFURLRef etc errors by adding:

to juce_mac_Files.cpp. I get the NSInteger error building the lib now.


#6

Actually, you can probably just change “NSInteger” to “int” to avoid the problem. Didn’t realise it was 10.5 only, I’ll avoid it from now on…


#7

thanks,

after that I got an error at line 2500 in juce_mac_Windowing.mm (unable to convert int to NSBitmapFormat), I added a cast:

bitmapFormat: (NSBitmapFormat)0

OK, now the lib compiles happily again. I generate a new amalgamated file for building the jucedemo. Building the jucedemo using the amalgamated file now gives an error

(There are two redefinition of AutoPool errors: as part of juce_mac_AudioCDBurner.mm and juce_mac_FileChooser.mm)

So, I tried surrounding the juce_mac_NativeHeaders.h code with an #ifdef to protect against multiple inlcudes (but perhaps this is an amalgamator issue since the lib compiles fine?).

I now get a weird compiler error building the jucedemo using the amalgamated file:

this is part of juce_Colours.cpp:

which I’m fairly sure is irrelevant. (Although I might wear an olivedrab tshirt for good luck today.)

I have 2GB of ram so I don’t think it’s the ram issue mentioned earlier in another thread.


#8

I wonder why I’ve not been hitting any of these errors… Maybe something’s not updating in my build process. Thanks, I’ll get some fixes checked-in shortly…

Internal compiler errors are a bit tricky though, that’s really in the hands of the gods…


#9

Thanks. I still can’t compile the jucedemo using the amalgamated file, weirdly it gives that bus error at “Colours::olivedrab” still (even though it’s a different line number than before).

I can use the amalgamated file with my one of my apps though, no bus error…


#10

What on earth is a “bus error” anyway…?


#11

It’s when the No. 12 takes a left at Queen’s St instead of going right up past the Black Swan.

Bruce


#12

[quote=“Bruce Wheaton”]It’s when the No. 12 takes a left at Queen’s St instead of going right up past the Black Swan.
[/quote]

Really? I always figured it was when it failed to stop at the Swan.


#13

For info, I tried a few things including toshi’s recommendations in another thread and deleteing xcode prefs and caches. Still a bus error using the amalgamted file for the jucedemo (both debug and release), I’ll report back if it gets solved.

BTW I still need to add

To juce_mac_Files.cpp to get juce to build.

I don’t know - you have no build errors for ages and then two come at the same time :slight_smile:


#14

It does seem like all the different OS versions need slightly different include files. I’ll be glad when I’ve finally got it all running on Cocoa and the whole thing should actually be a lot simpler.