Re: C file location

2017-12-05 Thread DTxplorer
Thanks for the tip. I guess in a serious project the headers are linked using a build tool.

Re: C file location

2017-12-05 Thread Lando
Trying to compile _use_c_function.nim_ results in Error: execution of an external compiler program 'gcc -c -w -I/home/ftep/.choosenim/toolchains/nim-0.17.2/lib -o /tmp/cftest/nimcache/use_c_function.o /tmp/cftest/nimcache/use_c_function.c' failed with exit code: 1 which po

Re: C file location

2017-12-05 Thread darek
You should tell nim where to look. There is an option --cincludes (try nim --advanced). So in your case: nim c --cincludes:"." use_c_function.nim

C file location

2017-12-04 Thread DTxplorer
Hi, I never had time to really test this great language, in consequence I'm a kind of eternal noob, so I apologize for the trivial problem. I try to bind a minimal C function for learning purpose. c_function.h int addTwo(int x) { return x + 2; } c_functio