当前位置:网站首页>Compile command line terminal swift
Compile command line terminal swift
2022-07-07 01:42:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack
So, this is where swift lives, after you've installed XCode 6 Beta:
/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift
Also, there's a directory named swift which has various libraries:
/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift
To start playing in a terminal:
export PATH=/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH
You could also change this in XCode 6's Preferences.
I use it via xcrun:
$ 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/macosx so 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_tool calls 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.x
1. install xcode 6 beta
2. Set the path :
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.swift
5 ./testPublisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/116893.html Link to the original text :https://javaforall.cn
边栏推荐
- Appium foundation - appium inspector positioning tool (I)
- JVM 内存模型
- C language instance_ five
- 拖拽改变顺序
- 405 method not allowed appears when the third party jumps to the website
- Set WordPress pseudo static connection (no pagoda)
- AcWing 346. 走廊泼水节 题解(推公式、最小生成树)
- AcWing 361. Sightseeing cow problem solution (SPFA seeking positive ring)
- C语言实例_4
- 交叉验证如何防止过拟合
猜你喜欢

移植DAC芯片MCP4725驱动到NUC980

Set WordPress pseudo static connection (no pagoda)

一起看看matlab工具箱内部是如何实现BP神经网络的
![JS reverse -- ob confusion and accelerated music that poked the [hornet's nest]](/img/40/da56fe6468da64dd37d6b5b0082206.png)
JS reverse -- ob confusion and accelerated music that poked the [hornet's nest]

According to the analysis of the Internet industry in 2022, how to choose a suitable position?

永久的摇篮

Start from the bottom structure to learn the customization and testing of fpga---- FIFO IP

C语言关于链表的代码看不懂?一篇文章让你拿捏二级指针并深入理解函数参数列表中传参的多种形式

How to manage distributed teams?

AcWing 361. Sightseeing cow problem solution (SPFA seeking positive ring)
随机推荐
Send template message via wechat official account
405 method not allowed appears when the third party jumps to the website
公钥\私人 ssh避password登陆
grep查找进程时,忽略grep进程本身
js如何快速创建一个长度为 n 的数组
curl 命令
Google发布安全更新,修复Chrome中已被利用的0 day
场景实践:基于函数计算快速搭建Wordpress博客系统
json学习初体验–第三者jar包实现bean、List、map创json格式
AcWing 345. 牛站 题解(floyd的性质、倍增)
Appium基础 — Appium Inspector定位工具(一)
Taro applet enables wxml code compression
Telnet,SSH1,SSH2,Telnet/SSL,Rlogin,Serial,TAPI,RAW
Using the entry level of DVA in taro3.*
Byte P7 professional level explanation: common tools and test methods for interface testing, Freeman
Appium automation test foundation uiautomatorviewer positioning tool
修改px4飞控的系统时间
域分析工具BloodHound的使用说明
机器学习:随机梯度下降(SGD)与梯度下降(GD)的区别与代码实现。
Dark horse notes - exception handling