Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Help > Re: Accessing X...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 3788 of 3882
Post > Topic >>

Re: Accessing XCode build settings

by David Phillip Oster <oster@[EMAIL PROTECTED] > Jun 29, 2008 at 08:58 AM

In article 
<baef4568-56b2-4f1a-a155-272b984c4b54@[EMAIL PROTECTED]
>,
 Korchkidu <korchkidu@[EMAIL PROTECTED]
> wrote:

> Hi,
> 
> I would like to access the build settings from inside my code. For
> example, I would like to access the CURRENT_PROJECT_VERSION setting so
> that when I compile my program, I know which version of my program it
> is (and eventually build a string containing the version number of the
> program).

The following works for me:

In the "Preprocessing" section of the project's info, I added, under 
'Preprocessing Macros'

SDKROOT="\"$SDKROOT\""





Test: this program uses SDKROOT:

#im****t <Foundation/Foundation.h>

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

    // insert code here...
    NSLog(@[EMAIL PROTECTED]
"Hello, World! %s", SDKROOT);
    [pool release];
    return 0;
}
 




 3 Posts in Topic:
Accessing XCode build settings
Korchkidu <korchkidu@[  2008-06-29 08:18:35 
Re: Accessing XCode build settings
David Phillip Oster <o  2008-06-29 08:58:58 
Re: Accessing XCode build settings
Korchkidu <korchkidu@[  2008-06-30 23:27:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 11:29:15 CST 2008.