threads.nim example fails
tissatussa opened this issue · comments
I'm trying to compile your threads.nim
example, as described in the README, but the command nim cpp -c threads.nim
fails with this error :
/home/roelof/Compiled/wxnim/examples/genuimacro/threads.nim(7, 11) Error: undeclared identifier: 'Thread'
I use Nim v1.6.18, set by choosenim
. This way i can successfully compile controlgallery.nim
, being the other example in that genuimacro
folder, but what's wrong with Thread ?
[ i'm on Xubuntu 22.04 ]
In Nim pre-2.0.0 threads have to be explicitly enabled with the --threads:on
switch. Just confirmed that running nim cpp --threads:on -r threads.nim
works fine.
@PMunch you're right, this works .. but i saw that --threads:on
option in the nim.cfg
file, located in the same folder .. then, what does that .cfg file do ?