9
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

kotlin/Nativeでサンプルのテトリスを動かす

Last updated at Posted at 2017-05-18

google i/o でkotlinがAndroidで公式サポートされる発表があったので、kotlin/Nativeのテトリスをビルドしてみた。

ライブラリの追加

Install SDL2 development files (see https://www.libsdl.org/download-2.0.php). For Mac - copy SDL2.framework to $HOME/Library/Frameworks. For Debian-like Linux - use apt-get install libsdl2-dev.

Kotolin-nativeのビルドには必要ないがテトリスのビルドにSDL2のライブラリが必要と書いているので、追加しておく

Kotolin-nativeのビルド

$ git clone https://github.com/JetBrains/kotlin-native
$ cd kotlin-native
$ ./gradlew dependencies:update
$ ./gradlew dist

パスを通す

$ export PATH=./dist/bin:$PATH

テトリスのビルド

$ cd samples/tetris
$ ./build.sh

実行

$ ./Tetris.kexe.kexe

スクリーンショット 2017-05-18 12.49.39.png

9
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?