Mac OS Lion

Hi there
In a moment Lion comes on the streets, but it seems like oF is not able to build against Lion? I just did a quick build of 007 in Xcode 4.2, and i was met with some errors in ofQuickTimePlayer.cpp and ofQuickTimeGrabber.cpp
for example:

  
   
error: 'DisposeGWorld' was not declared in this scope  
error: 'GetGWorldPixMap' was not declared in this scope  
error: 'MacSetRect' was not declared in this scope  
  

And it seems like that the code was deprecated back in tiger days.

I think Apple have removed all QuickDraw functions from the headers, so if you’re building against the 10.7 SDK, you won’t be able to compile any code that uses QD. The actual implementations of the functions are still available in the system libraries, though, so if you compile and link against the 10.6 SDK, the app should run under 10.7. At least, that’s what I have heard. :slight_smile:
So, I guess for full 10.7 SDK compatibility, OF needs to be updated so that it no longer uses any QuickDraw functions. (Also, for 64-bit compatibility, it needs to loose most/all QuickTime code as well, I think.)

/Jesper

There is a thread about this issue on the github issue tracker:
https://github.com/openframeworks/openFrameworks/issues/573#comment-1197787

The important part:

" find a solution to that issue.
The problem come from ApplicationService in Lion. It’s quittely different to compare with old ApplicationService.
So I simply erase the path reference in OF from this one and I add a link to the good framework
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework

The default path in Lion is :
System/Library/Frameworks/ApplicationServices.framework
and is the same than
/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/ApplicationServices.framework"

Thanks a lot! I was able to compile against 10.6. Don’t know why i didn’t think of that :confused:

Hi!
In my SDKs folder i hadn’t “MacOSX10.7.sdk” folder, so i created and i put inside all you said, but i have again this error:

Command /Developer/usr/bin/gcc-4.2 failed with exit code 1

Any suggestion?

Hi! I’m having the same problem under 10.7… I tried adding the /Developer/SDKs/MacOSX10.6.sdk/etc path into the _deployExamples.xproj, but the quicktime errors are persisting. I’m not sure how exactly I should be importing it into lion’s xcode.

Can anyone help with this? ???

i’m having the same problem, what do i have to change to get it running?

xef and panopticon, if you go to the link theo posted, you’ll find in the end of the thread that you have to change the SDK from 10.7 to 10.6 in both project settings and target settings. Well, the bad news is that I couldn’t solve the problem changing the SDKs (I don’t have much experience with x-code, but I think there’s only one way to do this inside the IDE and that’s what I did). I was able to compile the source with the download file from the OF page. Maybe you could try this one. If any of you guys find the correct way to compile with the project downloaded from github, let me know.

I haven’t coded on OF for a while and decided to give 007 a try on Lion OS. After trying several examples and failing (even keeping the base SDK 10.6) I was able to compile the apps/devApps/DictionaryTester project successfully, but no window opened. Any ideas why? Am I forgetting to change something on Xcode 4.1?

did you try the latest link on the download? we updated the zip a day ago to fix it for 10.7
git might not have that fix though, I’ll get on that.

Theo

Just wanted to point out that you also have to change the OS to 10.6 in libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj

This got me for a while.

I tried both, the download page and git. When I tried the download page I noticed I was missing folders, so I moved on to git. I just downloaded the v0.07 pre-release from the downloads page again (missing: scripts, others), tried the graphicsExample and the same thing happened. It builds with 1 warning (modernize) but nothing appears. I modernized without changing the OS to latest…and still nothing appears.

Hey Jeff, I checked the OS in libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj like you suggested, and it says 10.6 …

Have you changed the Scheme for the project? Maybe it is still configured to OF after you downloaded and compiled. Try changing it to graphicsExample or the example you’ve opened.

“When I tried the download page I noticed I was missing folders”
Nope thats it - please try that one. we changed the folder structure slightly.

also you need to have the 10.6 SDK installed in Lion. \
maybe that could be it?

mari, ainsoph is right - did you try changing the scheme - on my install it default to compiling to the openframeworks target but should be the name of your project. the menu is next to the run and stop buttons at the top left of xcode window. I didn’t have to mess with the sdks -just changed all the settings inside xcode

Can anyone help me with the following issue I have with Mac OS X Lion. I am trying to build a project which previously ran with Snow Leopard, I am getting the this error:

i686-apple-darwin10-gcc-4.2.1: /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h: No such file or directory
Command /Developer/usr/bin/gcc-4.2 failed with exit code 1

Thank you.

Xcode 3 or 4?

When I upgraded to Lion I had to re-run the Xcode 3.2.6 installer. It didn’t actually re-install Xcode as Xcode 3 doesn’t install on Lion unless you do something like this:

http://anatomicwax.tumblr.com/post/7906770311/installing-xcode-3-2-6-on-lion

For me - the other Dev tools is what it needed.

This is really mishandling on Apple’s part. When the minimum supported Mac OS X version is anything pre-10.6, the headers should still be available.

The right way to handle this is to just declare the headers yourself. Apple itself gives a good example, which you can include in your project:

http://www.opensource.apple.com/source/WebKit/WebKit-7534.48.3/mac/Misc/QuickDrawCompatibility.h?txt

Hi!

I also get this problem, and have the additional problem of being sort of a newby, or at least been away from programming for around 10 years, so anywa - where should i include the QuickDraawCompat…h file? In my main.cc or somewhere in openframework?

Cheers!
Mattias

Here’s how I fixed the ‘Carbon.h: No such file or directory’ build error on my system. I’m on OSX 10.8.3 running Xcode 3.2.6, OF 0.7.4 and Quicktime 7.6.6.

In Xcode, do ‘Project’ -> ‘Edit System Settings’. Select ‘Build’ tab. Select ‘Base SDK’. Switch it to ‘Mac OS X 10.6’. Close settings. Rebuild.