Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 716 Bytes

File metadata and controls

38 lines (25 loc) · 716 Bytes

Swift

Simple hello world program in swift

dependencies

clang, libicu-dev, & git (Linux/Unix)

building

build and run in macos

swift hello_world.swift 

build and run in Linux environment

Install Dependencies

sudo apt-get install clang libicu-dev -y
wget https://swift.org/builds/swift-4.1.2-release/ubuntu1404/swift-4.1.2-RELEASE/swift-4.1.2-RELEASE-ubuntu14.04.tar.gz
tar -xvzf swift-4.1.2-RELEASE-ubuntu14.04.tar.gz -C ~/swift

Configuring environment variables

sudo vi ~/.bashrc export PATH=~/swift/swift-4.1.2-RELEASE-ubuntu14.04/usr/bin:$PATH

Building & Running

swift build
.build/debug/helloworld-project