编译命令行终端 swift
So, this is where swift lives, after you've installed XCode 6 Beta:/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftAlso, there's a directory named swift which has various libraries:/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swiftTo start playing in a terminal:export PATH=/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATHYou could also change this in XCode 6's Preferences.I use it viaxcrun:$ xcrun swift -v -o test test.swift
Swift version 1.0 (swift-600.0.34.4.5)
Target: x86_64-apple-darwin14.0.0
/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file test.swift -enable-objc-attr-requires-objc-module -target x86_64-apple-darwin14.0.0 -module-name test -sdk /Applications/Xcode6-Beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -color-diagnostics -o /var/folders/2p/rs8p19s957ggyxzntnj3tp_40000gn/T/test-bb5ff8.o
/usr/bin/ld /var/folders/2p/rs8p19s957ggyxzntnj3tp_40000gn/T/test-bb5ff8.o -force_load /Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_macosx.a -syslibroot /Applications/Xcode6-Beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -lSystem -arch x86_64 -L /Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -rpath /Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -macosx_version_min 10.10.0 -no_objc_category_merging -o test
Note however the swift libraries are loaded (via
@rpath) from/Applications/Xcode6-Beta/.../swift/macosxso the binary won't work on another system unless it's got the same version of Xcode installed in the same place. Unless you want to do lots of copying/install_name_toolcalls to sort it out...$ otool -l test |fgrep path
name @rpath/libswiftAppKit.dylib (offset 24)
name @rpath/libswiftCoreGraphics.dylib (offset 24)
name @rpath/libswiftDarwin.dylib (offset 24)
name @rpath/libswiftDispatch.dylib (offset 24)
name @rpath/libswiftFoundation.dylib (offset 24)
name @rpath/libswiftObjectiveC.dylib (offset 24)
name @rpath/libswift_stdlib_core.dylib (offset 24)
path /Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.x1. 安装xcode 6 beta2. 设置路径:export PATH=/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH
3. vim test.swift
println("Hello swift")
4.
xcrun swift -v -o test test.swift5 ./test
编译命令行终端 swift的更多相关文章
- 12款最佳Linux命令行终端工具, 20款优秀的 Linux 终端仿真器
12款最佳Linux命令行终端工具 如果你跟我一样,整天要花大量的时间使用Linux命令行,而且正在寻找一些可替代系统自带的老旧且乏味的终端软件,那你真是找对了文章.我这里搜集了一些非常有趣的 ...
- [转]12款最佳Linux命令行终端工具
摘要 “工欲善其事必先利其器”,作为菜鸟,也是从别人那里偷学来的一些东东.今天看到同事用到一个终端命令行工具,觉得自己弱爆了.然后在网上搜了下该工具.发现类似的工具还是挺多的,只是自己不知道罢了. 原 ...
- 12款最佳Linux命令行终端工具
12款最佳Linux命令行终端工具 如果你跟我一样,整天要花大量的时间使用Linux命令行,而且正在寻找一些可替代系统自带的老旧且乏味的终端软件,那你真是找对了文章.我这里搜集了一些非常有趣的终端软件 ...
- 转:linux/unix命令行终端的光标及字符控制快捷键
from:http://linux.chinaunix.net/techdoc/system/2007/11/23/973027.shtml 在使用linux/unix的命令行终端时,有时候会碰到键盘 ...
- 在命令行终端运行 Elisp 脚本
通常,我们在 Emacs 中运行 Elisp 代码片段,但是也可能需要在命令行终端运行 Elisp 脚本程序.在命令行终端运行 Elisp 脚本需要使用 --script 选项,例如: emacs - ...
- Linux中命令行终端切换工具screen
screen命令 本文转自:http://man.linuxde.net/screen Screen是一款由GNU计划开发的用于命令行终端切换的自由软件.用户可以通过该软件同时连接多个本地或远程的命令 ...
- Mac系统打开命令行终端及查看操作系统版本号的方法
Mac系统打开命令行终端的方法: 应用程序 --> 实用工具 --> 终端 Mac系统终端查看操作系统版本号的方法: 输入:#more /System/Library/CoreServic ...
- 手把手教你打造高效的 Kubernetes 命令行终端
Kubernetes 作为云原生时代的操作系统,熟悉和使用它是每名用户的必备技能.本文将介绍一些提高操作 Kubernetes 效率的技巧以及如何打造一个高效的 Kubernetes 命令行终端的方法 ...
- MAC与windows下打开当前文件路径的命令行(终端)
MAC 下文件夹与终端: 1.打开当前路径的终端窗口方法: ①直接拖动要打开的文件夹到终端 ②打开finder的服务偏好设置, 勾选"新建位于文件夹位置的终端"选项, 以后可以在文 ...
随机推荐
- android水平循环滚动控件
CycleScrollView.java package com.example.test; import android.content.Context; import android.graphi ...
- [cocos2d-x]屏幕自适应解决的方法
近期在写一个项目,要求pc,ipad,andriod平台上都能够执行,所以选择用cocos2d-x来开发. 我们的资源大小是1024*768的,在pc上和苹果上都是没有问题的,但是到了andriod上 ...
- NSDictionary、NSMutableDictionary基本使用
郝萌主倾心贡献,尊重作者的劳动成果.请勿转载. 假设文章对您有所帮助,欢迎给作者捐赠,支持郝萌主,捐赠数额任意,重在心意^_^ 我要捐赠: 点击捐赠 Cocos2d-X源代码下载:点我传送 游戏官方下 ...
- Perl语言学习笔记 9 正则表达式处理文本
1.更换 s/PATTERN/REPLACE/; #返回是否更换成功布尔值 能够使用捕获变量,如:s/(\w)/$1/ 匹配失败则不做不论什么处理 2.定界符 对于没有左右之分的定界符.反复三次就可以 ...
- 第二篇Activity:2、任务和返回堆栈(Tasks and Back Stack)之基本介绍
参考:http://developer.android.com/guide/components/tasks-and-back-stack.html 在Android中,一个应用程序里面,通常包含了多 ...
- POJ题目分类【实在是不知道哪个是原创了】
原地址:http://blog.csdn.net/liuqiyao_01/article/details/8477801 初期:一.基本算法: (1)枚举. (poj1753,poj2965) ...
- TCP关闭过程
状态迁移 . SO_LINGER/ SO_REUSEADDR TCP正常的关闭过程如下(四次握手过程): (FIN_WAIT_1) A ---FIN---> B(CLOSE_WAIT) (FIN ...
- tomcat 下部署 php
由于需要测试一个PHP的环境.故记录此处. 环境 OS:win8.1 up1 64bit tomcat :8.0.14 64bit php:php-5.6.2-Win32-VC11-x64.zip 将 ...
- Software Development and Newton's Laws of Motion
Software Development and Newton's Laws of Motion Intro I have no idea since when the word velocity f ...
- My Solution: Word Ladder
public class Solution { public int ladderLength(String start, String end, Set<String> dict) { ...