Just started a new project to learn about threads with nim.
when isMainModule:
echo("Hello, World!")
When I compile and run it prints "Hello, World!", but if I compile with --threads:on nothing happens. What am I missing here?I've just tried creating a new local Nimble binary package:
.
├── src
│ ├── tot
│ ├── tot.cfg
│ └── tot.nim
├── tot
└── tot.nimble
tot.cfg just has --threads:on.
And running nimble run works here, it just outputs "Hello, World!" (same as without tot.cfg).
Two prints showing the result, as you can see the .cfg file is inside the src folder.
I tried without nimble, using this line nim c --colors:on --path:C:\Users\psore\.nimble\pkgs\lua-1.0 -o:.\bin\server.exe .\src\main.nim to compile my server, this will compile the binary and I can run int with no problems, but if I include --threads:on and compile it, will run and close immediately.
I copied this line from nimble with --verbose. I will try this on wsl, maybe it's a problem with the windows version...