[转帖]如何在Xcode中运行c 程序_Android, Python及开发编程讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  Android, Python及开发编程讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3116 | 回复: 0   主题: [转帖]如何在Xcode中运行c 程序        下一篇 
hao.zhang
注册用户
等级:上尉
经验:735
发帖:60
精华:0
注册:2013-10-25
状态:离线
发送短消息息给hao.zhang 加好友    发送短消息息给hao.zhang 发消息
发表于: IP:您无权察看 2013-10-30 15:53:27 | [全部帖] [楼主帖] 楼主

我是純粹的新手,要寃c/c++. 剛裝了xcode 3.1 ,第一次用,打開新文件,寫了一個hello.cpp的幼兒園程序。卻不知道如何運行。
試著用terminal, 鎖入 gcc hello.cpp ,  it says: command no found.

os x 10.5.8 leopard, xcode 3.1


解决办法:

1. run xcode.
2. create a new project; choose "command line project", choose "c" in the "type" menu
3. save your project use the any name.
4. in the project material window, open the "***.c" under the "source" folder. double click.
5. "hello world" is already a default example that xcode presented. delete the content between "//insert code here" and the next "}"
6. write whatever you want.
7. click "build and run" to build and run.




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论