Swift on OS X compiling for Linux? -
i'm confused build process swift on other platforms.
does swift allow me build linux project on os x, or need use swift on linux to build plan on using there?
i looked @ documentation, it's not clear on topic...
a pure swift application not importing framework can compiled ios, os x , linux.
you generate different executables, because it's different platforms, code source can same, has compiled respective platform.
the difference when import frameworks.
if import uikit make ios application, won't able compile on linux, because linux doesn't have ios uikit libraries, they're available on mac via xcode.
if import cocoa make os x application, same logic applies, works os x.
the same way, can make swift code works on linux if import specific linux libraries, glibc, won't work on mac.
etc, etc.
what need remember programming language isn't relevant when comes make applications platform, it's frameworks , libraries you're linked decisive.
different swift versions come different compilers (different toolchains, actually) answer directly, no can't compile linux swift normal os x swift compiler, have use swift.org's one.
Comments
Post a Comment