Hello Objective-C

第一次使用xcode,使用流程

 

图一:选择Create a new Xcode project


图二:选择Command Line Tol, Type choose Foundation

 

 

 

上面选择的是命令行工具,类型是函数类型,这样生成的代码是可以在命令行下执行的结构

main.m文件中的代码是

//--------------------------------------------

 

#import <Foundation/Foundation.h>

 

int main (int argc, const char * argv[]) {

    NSLog(@"Hello, Objective-C!");

    return (0);

}

//--------------------------------------------

执行结果为

 

[Switching to process 612]

2011-04-07 12:54:17.060 Hello Objective-C[612:a0f] Hello, Objective-C!

Running…

 

Debugger stopped.

Program exited with status value:0.

//--------------------------------------------

 

 

工程文件结构:

Foundation.framework:

Foundation Framework is a that is built prior to any application that are built on top of it

 

应用程序是在foudation.framework上被编译的

 

Hello Objective-C

terminal窗口,类似于Run->Control

 

Hello Objective-C.pch

 

.pch

文件类型:Precompiled Header File

 

扩展名为.pch的文件是一个开发文件。

 

文件说明:

Contains programming code referenced by a source code file, often using an #include preprocessor directive; may reference other header (.H) files and other resources.

 

PCH files are used by Microsoft Visual C++ and other software development programs, such as Apple Xcode; PCH files used by Xcode are called Prefix Header files and are typically named

 

 

 

Hello Objective-C.l文件是什么用处还不知道,看起来像是某种汇编语言之类的语法,可能是对整个工程的描述吧

 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值