Created
June 14, 2014 14:52
-
-
Save FUKUZAWA-Tadashi/35a6297f82ec3929cefa to your computer and use it in GitHub Desktop.
コマンドラインでswiftモジュールを作成、リンクする ref: http://qiita.com/FUKUZAWA-Tadashi@github/items/5e276c17af76fef7567b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ export PATH=/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ swift -module-name Hoge -emit-module Hoge.swift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ swift -module-name Hoge -emit-object Hoge.swift | |
$ libtool -L/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -dynamic -lswift_stdlib_core -lc -o libHoge.dylib Hoge.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ swift -I . -L . -lHoge sample.swift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./sample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ swift -I . -L . -lHoge -i sample.swift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ swift -I . -L . -lHoge -integrated-repl | |
Welcome to swift. Type ':help' for assistance. | |
(swift) import Hoge | |
(swift) var x = Hoge() // など、後はお好きなように |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment