๐Ÿ‘ฉโ€๐Ÿ’ป๏ธTIL14. Let's Start Swift

Lilyยท2021๋…„ 6์›” 8์ผ
0

Today I Learned

๋ชฉ๋ก ๋ณด๊ธฐ
14/30
post-thumbnail
post-custom-banner

๋งŽ์€ ๊ณ ๋ฏผ๋์— ios์•ฑ ๊ฐœ๋ฐœ์ž๊ฐ€ ๋˜๊ธฐ๋กœ ๊ฒฐ์‹ฌํ–ˆ๋‹ค. ๊ทธ ์—ฌ์ •์˜ ์ฒซ ์‹œ์ž‘์„ ๊ธฐ๋กํ•ด๋ณธ๋‹ค!

์šฐ์„  ๋‚˜๋Š” ๋งฅ๋ถ์ด ์—†๋‹ค. swift๊ฐ€ mac OS์™€ Ubuntu์—์„œ๋งŒ ์‹คํ–‰๋œ๋‹ค๊ณ  ์•Œ๊ณ  ์žˆ์–ด Ubuntu๋ฅผ ๋“€์–ผ๋ถ€ํŒ…์œผ๋กœ ์„ค์น˜ํ–ˆ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์˜ค๋Š˜ swift๊ฐœ๋ฐœํ™˜๊ฒฝ ๊ตฌ์ถ•์— ๋Œ€ํ•œ ๊ธ€๋“ค์„ ์ฐพ์•„๋ณด๋‹ค, window10์—์„œ๋„ ์‚ฌ์šฉ์ด ๊ฐ€๋Šฅํ•˜๋‹ค๋Š” ์†Œ์‹์„ ์ ‘ํ•˜์˜€๋‹ค.๐Ÿ˜ฒ ํ•˜์ง€๋งŒ...์šฐ๋ถ„ํˆฌ๋ฅผ ์„ค์น˜ํ•˜๋Š”๊ฒƒ์ด ์•„์ฃผ ํž˜๋“ค์—ˆ์œผ๋ฏ€๋กœ, ๋š์‹ฌ์žˆ๊ฒŒ ์šฐ๋ถ„ํˆฌ์— swift๋ฅผ ์„ค์น˜ํ•ด๋ณด๊ธฐ๋กœ ํ–ˆ๋‹ค.

๐Ÿ’—๏ธ Ubuntu20.04์— swift ์„ค์น˜ํ•˜๊ธฐ

์•„๋ž˜ ๋ธ”๋กœ๊ฑฐ๋‹˜๋“ค์˜ ํฐ ๋„์›€์„ ๋ฐ›์•„, ํฌ๊ฒŒ ์•„๋ž˜ ์ˆœ์„œ๋Œ€๋กœ swift๋ฅผ ์„ค์น˜ํ•˜์˜€๋‹ค.
https://nicotina04.tistory.com/99
https://blog.yagom.net/535/

  1. ํ•„์š”ํŒจํ‚ค์ง€ ์„ค์น˜(clang, libicu-dev)
$ sudo apt-get install clang libicu-dev
  1. swift5.4.1๋‹ค์šด๋กœ๋“œ (https://swift.org/download/#releases)
  2. GPGํ‚ค ์ถ”๊ฐ€
$ wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
  1. swiftํŒŒ์ผ ์••์ถ• ํ’€๊ธฐ
$ tar xzf swift-5.4.1-RELEASE-ubuntu20.04.tar.gz
  1. usr๋””๋ ‰ํ† ๋ฆฌ์— ํŒŒ์ผ ๋ณต์‚ฌ,
    ์‹œ๋„ํ–ˆ์œผ๋‚˜ "๋””๋ ‰ํ„ฐ๋ฆฌ๊ฐ€ ์•„๋‹Œ '/usr/lib/clang/10.0.0/include'๋ฅผ ๋””๋ ‰ํ„ฐ๋ฆฌ 'swift-5.4.1-RELEASE-ubuntu20.04/usr/lib/clang/10.0.0/include'๋กœ ๋ฎ์–ด์“ธ ์ˆ˜ ์—†์Œ" ๊ณผ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜์—ฌ 6๋ฒˆ ๋ฐฉ๋ฒ•์„ ์‹œ๋„ํ–ˆ๋‹ค.
  2. optํด๋”๋ฅผ ์ƒ์„ฑ > optํด๋”๋กœ ์ด๋™ > ํ™˜๊ฒฝ๋ณ€์ˆ˜์— ์ถ”๊ฐ€ (์•ผ๊ณฐ๋‹˜ ๋ธ”๋กœ๊ทธ ์ฐธ๊ณ )
  3. ์„ค์น˜ ์™„๋ฃŒ!

์šฐ๋ถ„ํˆฌ์— Swift๋ฅผ ์„ค์น˜ํ•˜๋ ค๋Š” ๋ถ„๋“ค๊ฒŒ ์กฐ๊ธˆ์ด๋‚˜๋งˆ ๋„์›€์ด ๋˜์—ˆ์œผ๋ฉด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค!๐Ÿ˜Š

profile
i๐ŸŽS ๊ฐœ๋ฐœ์„ ํ•ฉ๋‹ˆ๋‹ค
post-custom-banner

0๊ฐœ์˜ ๋Œ“๊ธ€