Re: generate c++ code from .nim file

2020-04-21 Thread Araq
No, the Nim compiler always generates multiple C++ files so that they can compiled in parallel.

Re: generate c++ code from .nim file

2020-04-21 Thread minimisthupper
one last question: is there a way to get only one file with the lib files included (without compiling and linking them) ?

Re: generate c++ code from .nim file

2020-04-17 Thread minimisthupper
ok, thanks!

Re: generate c++ code from .nim file

2020-04-17 Thread dom96
You'll need to copy this file beside your .cpp file. This is supposed to be copied automatically when using `--genScript` (if you're using 1.0.6 it should work), with latest versions of Nim it doesn't get copied (see

Re: generate c++ code from .nim file

2020-04-17 Thread minimisthupper
i get this error every time, when i compile my main file : @msecond.nim.cpp:9:10: fatal error: 'nimbase.h' file not found #include "nimbase.h" ^~~ 1 error generated. Run

Re: generate c++ code from .nim file

2020-04-16 Thread juancarlospaco
You can use a C++ code beautifier, like astyle, and skip the mangling with exportc pragma, but for reading only not for code thats actually used.

Re: generate c++ code from .nim file

2020-04-16 Thread minimisthupper
ok, big thanks for answering so fast! :)

Re: generate c++ code from .nim file

2020-04-14 Thread jyapayne
@minimisthupper you can get smaller output if you use -d:release or -d:danger, but the danger flag is not recommended

Re: generate c++ code from .nim file

2020-04-14 Thread zevv
Sorry, no. The Nim-generated C and C++ code is ment to be read by - and highly optimized for - compilers, not humans.

Re: generate c++ code from .nim file

2020-04-14 Thread minimisthupper
any way to get clean code? my very small nim file is like 400 lines of cpp code

Re: generate c++ code from .nim file

2020-04-13 Thread minimisthupper
Thanks! :)

Re: generate c++ code from .nim file

2020-04-13 Thread Stefan_Salewski
nim cpp mynimfile.nim The c++ code is stored in the nimcache directory, see [https://nim-lang.org/docs/nimc.html#compiler-usage-generated-c-code-directory](https://nim-lang.org/docs/nimc.html#compiler-usage-generated-c-code-directory)

generate c++ code from .nim file

2020-04-13 Thread minimisthupper
Hi, is there a way to generate c++ code from my .nim file? Thanks, Minimisthupper