作者donkeychen (Bad_To_The_Bone)
看板MacDev
标题[问题] 请问xcode 4.5.2 怎麽让run的输出在专案
时间Mon Nov 26 16:32:48 2012
标题: 请问xcode 4.5.2 怎麽设定让 build的binary 档输出到project目录底下
大家好
小弟是新手 连finder 都不太会用的mac新手
刚接触xcode
在apple store下载了目前的版本4.5.2 然後装了
iOS 5.1 Simulator
iOS 5.0 Simulator
Command Line Tool
===================
虽然上面三个东西对於写一个osx底下的hello world没什麽关系
但是我都装了避免日後少东西
由於网路上找到的<<Become an Xcoder>>里面
介绍到有介面的部分
很多东西都与目前xcode的介面不同 找不太到
所以我想我从简单的hello world 来开始
1. File-> New-> Project-> OS X-> Application -> Command Line Tool
按下[Next]
Product Name : hello
Organation Name: xxx
Company Identifier: xxx
Type 这边我选了Foundation
(我看Become an Xcoder里面范例用#import <Foundation/Foundation.h>
至於有个预设打勾的 Use Automatic Reference Counting 我不太清楚是否要用
看他预设打勾我就不去变更了
按下[Next]
接着出现要放在哪边 我选了 文件
按下[Create]
接着在文件里面就产生了
/User/xxxx/Document/hello
/hello
/hello.pch
/hello.1
/main.m
/hello.xcodeproj
==================================================
2.创建之後
最左边的栏位
hello 1 target, OS X SDK 10.8
hello
main.m
hello.1
Supporting Files
hello-Prefix.pch
Framworks
Foundation.framework
Products
hello (目前是红色的 应该是没有这个档案)
点选
hello 1 target, OS X SDK 10.8
中间的部分
PROJECT hello
TARGET hello
Architectures
Build Active Architecture Only
Debug YES
Release NO
有些可以设定 Building Settings 这个项目 (All Combined)
Build Locations
Build Products Path build
Intermediate Build Files Path build
Per-configuration Build Products Path
Debug build/Debug
Release build/Release
Per-configuration Intermediate Build Fi..
Debug build/hello.build/Debug
Release build/hello.build/Release
上面这些都是我建构这个project後就会产生的预设设定
由於code很简单就是NSLog(@"hello world");
我直接点了左上的Run
之後 就出现了 Build Successed.
之後Products 里面的hello就变黑了
但是这个执行档位於
/User/xxxx/Library/Developer/Xcode/DerivedData/hello-一串字/Build/
Products/Debug/hello
我希望他能够产生
/User/xxxx/Document/hello
目录内
看到网路上有说要到
1.Preferences -> Building -> Place Build Products in -> Project Directory
2.Preferences -> Building -> Place Intermediate Build Files in
-> With build products
但是我在xcode 4.5.2的 Preferences 没有看到这两个选项
想请教一下该到哪边去调整这个设定呢
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 211.72.248.50
※ 编辑: donkeychen 来自: 211.72.248.50 (11/26 16:33)
1F:→ donkeychen:另外请教一下 Build Active Architecture Only 11/26 16:36
2F:→ donkeychen:这边的选项改了有差吗 我都改成Yes还是只build出debug 11/26 16:39
3F:推 sorkayi:我不知道你想做什麽 想先问 你有缴钱嘛 11/27 11:43
4F:→ sorkayi:假设有可以去看看 ad-hoc 的发布 11/27 11:44
5F:→ sorkayi:喔喔 拍谢 我以为你是要发布 iPhone 的东西 没注意看到 11/27 13:39
6F:→ donkeychen:喔喔 我想让他build出来的东西在source code的目录 11/28 17:32
7F:→ donkeychen:底下 目前一直build到外面 (~\Library下) 11/28 17:33