Some compilation problems on rev 639

Hi!
I’m kinda stuck with compiling juce

I get the following errors when xcode is trying to compile juce_socket.cpp

/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:108: error: expected identifier before numeric constant /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:108: error: expected `}' before numeric constant /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:108: error: expected unqualified-id before numeric constant /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:575: error: expected declaration before '}' token

i tried to track the problem and ended up somewhere in juce_StandardHeader.h:

#if JUCE_MAC #if MACOS_10_3_OR_EARLIER #include <CoreServices/CoreServices.h> #else #include <libkern/OSAtomic.h> #endif #endif

i tried to comment out the MACOS_10_3_OR_EARLIER conditional
and i got numerous errors, which leads me to think that maybe im missing a project definition.

uncommenting it resulted in a successfull build, but trying to build my own project now results in linking errors. after a cleanup the errors return.

im using the 10.5 base sdk for compiling juce
trying to compile in 32/64bit universal mode , gave me even more errors…

what am i missing?

peace!

[quote=“red_muze”]Hi!

im using the 10.5 base sdk for compiling juce
[/quote]

Looks like you’re mixing 10.4 and 10.5 SDKs somehow, the error is in the 10.4 SDK but you say you’re using 10.5.

sorry that was from my first compilation here is the 10.5 one

/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:108: error: expected identifier before numeric constant /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:108: error: expected `}' before numeric constant /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:108: error: expected unqualified-id before numeric constant /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransportProviders.h:582: error: expected declaration before '}' token

Does sound like you’re mixing frameworks somehow, though it’s hard to tell exactly what’s going on.

yes, it’s not 64-bit ready yet. Almost there, but there are still a few areas I need to finish off.

well should i do anything special besides opening the project, and compiling?

when that didn’t work, i tried changing to the 10.5 sdk.

thats it.

i must be missing something or that revision is broken somehow…

Which project are you building - juce itself, or the demo?

juce itself

I’m slightly stuck about what might be wrong. I’ve made a few changes this week though, are you fully up to date with the SVN tip?

yes checked out the last svn revision yesterday
(639 from the 12th)

the code seems correct when i look at it,
and the wierdness gets worse after i comment that line - get an error uncomment it, and i get a successful build. but then it doesnt link in my own project. another cleanup in the juce project after that pseudo successful compilations just brings the same 4 errors back.

the error happens when compiling juce_socket.cpp …

ill try going back some revisions and see where it broke

small updates:
i updated to revision 641 and i still get the errors.
i downgraded to revision 632 and i get no errors. so i guess im going to pin it down soon :wink:
638 compiles no problem…

ok. it definitely broke between 638 and 639. and it maybe the includes on juce_socket.cpp
if i find out more ill let u know

Ah, well I did remove an old Carbon.h include, but it seemed to be fine without it. Funny thing is that you’re getting an error in a CoreServices header, and it really shouldn’t be loading any CoreServices stuff…

Ok im no expert on OS stuff but i did some digging and here is what i got:
i went to "juce_PlatformDefs.h"
and set:
#define MACOS_10_3_OR_EARLIER 1
to 0
compiled 641 and it worx :slight_smile:

so i wanted to see what defines my 10.5 as 10.3
and reached: “AvailabilityMacros.h” in the mac sdk
where it said:

[code]/*

  • If min OS not specified, assume 10.1
  • Note: gcc driver may set ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED based on MACOSX_DEPLOYMENT_TARGET environment variable
    */[/code]
    in the xcode project , on the juce target, there is a user definition :
    MACOSX_DEPLOYMENT_TARGET_ppc [10.3]
    and im wondering if that has anything to do with it.

as i understand cocoa is just fully functional from 10.4 or 10.5, and power pcs do work with leopard and tiger so why is this definition there? should i have changed it?

changing that to 10.4 solved the issues