Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / September 2005



Tip: Looking for answers? Try searching our database.

MAC_OS_X_VERSION_MIN_REQUIRED   redefined?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bint - 05 Sep 2005 22:55 GMT
Hello,

 I am trying to set MAC_OS_X_VERSION_MIN_REQUIRED in my app, like so:

#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3

However, CW is giving me an error, saying

Error   : macro 'MAC_OS_X_VERSION_MIN_REQUIRED' redefined

Error   :     (location of previous definition)
           #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_1

How can I define this so that I don't get an error?  I tried putting in my
Preprocessor panel text, but that also gave me an error.

Thanks!
Bint
larry@skytag.com - 06 Sep 2005 02:24 GMT
Where is it previously defined? I define mine in my .pch prefix file.

Larry
Bint - 06 Sep 2005 16:23 GMT
On 9/5/05 8:24 PM, in article
1125969866.568245.171880@g14g2000cwa.googlegroups.com, "larry@skytag.com"

> Where is it previously defined? I define mine in my .pch prefix file.
>
> Larry

I don't know.  It just says this:

Error   :     (location of previous definition)
           #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_1

Then, in /usr/include/AvailabilityMacros.h has this:

/*
* 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
*/
#ifndef MAC_OS_X_VERSION_MIN_REQUIRED
   #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
       #define MAC_OS_X_VERSION_MIN_REQUIRED
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
   #else
       #if __ppc64__ || __i386__
           #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4
       #else
           #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_1
       #endif
   #endif
#endif

B
Sean McBride - 06 Sep 2005 03:42 GMT
> How can I define this so that I don't get an error?  I tried putting in my
> Preprocessor panel text, but that also gave me an error.

Well, you could always use #undef as a workaround.
Bint - 06 Sep 2005 16:19 GMT
On 9/5/05 9:42 PM, in article cwatson-C444A0.22421905092005@aeinews.aei.ca,

>> How can I define this so that I don't get an error?  I tried putting in my
>> Preprocessor panel text, but that also gave me an error.
>
> Well, you could always use #undef as a workaround.

Really?  I didn't know about that.
B
Ben Artin - 06 Sep 2005 20:17 GMT
>   I am trying to set MAC_OS_X_VERSION_MIN_REQUIRED in my app, like so:
>
[quoted text clipped - 3 lines]
>
> Error   : macro 'MAC_OS_X_VERSION_MIN_REQUIRED' redefined

You need to put your macro before the OS default, which means that it needs to
go into C/C++ preprocessor settings of your target, not in your source.

hth

Ben

Signature

If this message helped you, consider buying an item
from my wish list: <http://artins.org/ben/wishlist>

I changed my name: <http://periodic-kingdom.org/People/NameChange.php>

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.