How to install Nim programming language

Install Nim lang on Windows

Following the guide on

Assuming you have Git for Windows and Gow installed

cd ~/Downloads
unzip *.zip
mv nim-1* ../nim32

Then Clicking nim32/finish.exe to download MinGw and set PATH

First Nim program

Run nim in Command Prompt, if it reports its version and usage, we're good to continue

Run "hello World" nim program

mkdir -p code/nim/hello
cd code/nim/hello
touch hello.nim

echo "Hello" > hello.nim

nim c hello.nim

How to build res file with MinGW on Windows

%NIMPATH%\dist\mingw32\bin\windres -O coff EasiestSoft.rc -o 32.res
%NIMPATH%\dist\mingw64\bin\windres -O coff EasiestSoft.rc -o 64.res


1000 ICON "EasiestSoft.ico"

linking res file to exe on Windows

Adding following code to source code:

when defined(gcc) and defined(windows):
when defined(x86):
	{.link: "res/32.res".}
	{.link: "res/64.res".}

Install choosenim ?

choosenim does not have the option of installing the x86 version of Nim, which is useless for me



©2012-2019 EasiestSoft