I am a beginner of Objective C and XCode. I use Mac os X Lion and XCode 4.2. first, I create a project, command line tool, type is fundation. it generate a ‘hello world’ project.
I build it use command + B and run it by command + R.
it output “hello world” on console output.
when I change the code, and build it again, but it is always output “Hello World”…
this is my new code:
#import <Foundation/Foundation.h>
BOOL CompareInt( int lhs, int rhs );
void DumpBOOL( BOOL bValue );
BOOL CompareInt( int lhs, int rhs ) { return lhs == rhs; }
void DumpBOOL( BOOL bValue ) {
if( bValue == YES )
{
NSLog( @"YES" );
}
else
{
NSLog( @"NO" );
}
}
int main (int argc, const char * argv[]) {
DumpBOOL( CompareInt(100, 1000) );
@autoreleasepool
{
// insert code here...
NSLog( @"Hello, World!!!!");
}
return 0;
}
if I change the setting on the left, change “my Mac 64-bit” to “My Mac 32-bit”, it work success.
so, I want to know how to solve it with 64bit setting.
I recreated this project, and it’s ok now.
I don’t know the reason for the problem!.