Re: MAC_OS_X_VERSION_MAX_ALLOWED?
- From: David Phillip Oster <oster@xxxxxxxx>
- Date: Tue, 17 Jan 2006 03:47:37 GMT
In article <1h99rp5.194lobb17iq2zyN%burt@xxxxxxxxxxxxxxxxx>,
burt@xxxxxxxxxxxxxxxxx (Burt Johnson) wrote:
> Just starting OS X development for the first time. I wrote Mac code in
> the 90's, but never had a chance for a OS X project till now (been on
> the Dark Side with VC++ the past few years)
>
> I was handed a project started by another programmer that had to bail,
> and am trying to get it to build. I have gone through the first few
> chapters of "Cocoa Programming For Mac OS X" by Hillegass to get the
> basic foundation.
>
> I try to build this inherited code, and get an error in my xx_prefix.pch
> saying
>
> MAC_OS_X_VERSION_MAX_ALLOWED must be >= MAC_OS_X_VERSION_MIN REQUIRED
>
> Doing a search on the project, I can't see where either is defined
> though. I _do_ find the check in foundation.h, which is imported in
> cocco.h, which is imported in xx_prefix.pch.
>
> Where do I find these constants?
>
> While we are at it, any other hints in general to getting someone else's
> code running on my machine? Any common gotcha's when moving between
> developer's machines that I should know about?
Create a New project of a similar type with the correct name, using
XCode's New Project menu command, then, in the Finder, copy over your
sources into the new project's folder, then, with XCode over, drag the
sources onto the project window. That will at least set up your
precompiled prefix and general build environment.
The correct name, because you'd have to go to many arcane dialog boxes
and config files to change it later.
Command-clicking on MAC_OS_X_VERSION_MAX_ALLOWED or on
MAC_OS_X_VERSION_MIN_REQUIRED shows that they are defined in
/usr/include/AvailabilityMacros.h
or:
/Developer/SDKs/MacOSX10.4.0.sdk/usr/include/AvailabilityMacros.h
if you are using one of the /Developer/SDKs to specify a specific
software version.
Biggest gotcha is non-system libraries that you forget to move, or add
to your project, so that the code is actually linked in. Also, if you
are using Cocoa, and you have ZeroLink turned on, your program will
happily run with some missing libraries, with messages to non-existent
objects just returning nil.
.
- Follow-Ups:
- BYTE and DWORD
- From: Burt Johnson
- Re: MAC_OS_X_VERSION_MAX_ALLOWED?
- From: Burt Johnson
- BYTE and DWORD
- References:
- MAC_OS_X_VERSION_MAX_ALLOWED?
- From: Burt Johnson
- MAC_OS_X_VERSION_MAX_ALLOWED?
- Prev by Date: Re: MAC_OS_X_VERSION_MAX_ALLOWED?
- Next by Date: Re: determining cpu type at runtime
- Previous by thread: MAC_OS_X_VERSION_MAX_ALLOWED?
- Next by thread: Re: MAC_OS_X_VERSION_MAX_ALLOWED?
- Index(es):
Relevant Pages
|