我是 Objective C 和 XCode 的初学者。我使用 Mac os X Lion 和 XCode 4.2。首先,我创建一个项目,命令行工具,类型是fundation。它生成一个“hello world”项目。我使用 command + B 构建它并通过 command + R 运行它。它在控制台输出上输出“hello world”。当我更改代码并重新构建它时,它总是输出“Hello World”......这是我的新代码:
#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;
}
如果我更改左侧的设置,将“我的 Mac 64 位”更改为“我的 Mac 32 位”,它就会成功。所以,我想知道如何用64位设置解决它。