しかし今はWindowsでやっておりまして、Macの作業に戻るのは明日か明後日になります。
さて、とりあえずWindows側でやってみました。
まず、Nim公式のIDEは使い物になりません。文字が見えません。バグでしょう。
次に、Nim公式には
Note: The Nim compiler requires a C compiler to compile software. On Windows we recommend that you use Mingw-w64. GCC is recommended on Linux and Clang on Mac.
私は最初
Windows:Mingw-w64コンパイラ
Linux:GCCコンパイラ
Mac:Clangコンパイラ
が推奨されているという意味なのかと思っていました。
また、gcc.exeへのパスは自分で通す必要があります。
私は今までVisualStudioぐらいしか使ったことが無かったので、このあたりのことが全くわからず路頭に迷っていました。
さて、これで環境は整ったはずなので、最も単純だと思われるNimプログラムをコンパイルしてみます。
test.nim
[codeNim]echo "Hello, Nim!"[/code]
C:\Users\MoNoQLoREATOR\Documents\projects\nim\first_test>nim c -r test.nim
c:\nim\config\nim.cfg(53, 3) Hint: added path: 'C:\Users\MoNoQLoREATOR\.babel\pkgs\' [Path]
c:\nim\config\nim.cfg(54, 3) Hint: added path: 'C:\Users\MoNoQLoREATOR\.nimble\pkgs\' [Path]
Hint: used config file 'C:\Nim\config\nim.cfg' [Conf]
Hint: system [Processing]
Hint: test [Processing]
CC: test
CC: stdlib_system
In file included from c:\users\monoqloreator\documents\projects\nim\first_test\nimcache\test.c:8:0:
C:\Nim\lib/nimbase.h:393:13: error: size of array 'assert_numbits' is negative
typedef int assert_numbits[sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
^
In file included from c:\users\monoqloreator\documents\projects\nim\first_test\nimcache\stdlib_system.c:8:0:
C:\Nim\lib/nimbase.h:393:13: error: size of array 'assert_numbits' is negative
typedef int assert_numbits[sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
^
Error: execution of an external program failed; rerun with --parallelBuild:1 to see the error message
まあ、コンパイル自体が可能な段階まで進んだので、今日のところはこれでよしとしましょう。
おやすみなさい。