i created a file named nim_1.1.1.nim
the content is echo "hello world!"
and try to complie it, error:
D:\nim>nim c nim_1.1.1.nim c:\nim\config\nim.cfg(54, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.babel\pkgs\' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\cairo-1.0' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\strfmt-0.8.0' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\aporia-0.2.0' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\q-0.0.2' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\dialogs-1.0' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\redis-0.1.0' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\jester-0.1.0' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\sdl2-1.0' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\zmq-0.2.1' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\opengl-1.0' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\x11-1.0' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\nimble-0.6.2' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\compiler-0.10.3' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\gtk2-1.0' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\nake-1.8' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\jnim-0.1' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\brainfuck-0.1.0' [Path] c:\nim\config\nim.cfg(55, 3) Hint: added path: 'C:\Documents and Settings\Admini strator\.nimble\pkgs\' [Path] Hint: used config file 'C:\Nim\config\nim.cfg' [Conf] Hint: system [Processing] Error: invalid module name: 'nim_1.1.1'
when i use nim c nim_1.1.1, the error is:
Error: invalid module name: 'nim_1.1'
i think this maybe an error of naming the nim source file, or the compiler's fault
C and C++ both allow for including files with arbitrary names, however that is because the inclusion is handled by the preprocessor - there is no way to use the name of an included file in the same way you would use a module name.
You can always use the switch --out:
-o:FILE, --out:FILE set the output filename
You can always use the switch --out:
No, I can't! It has nothing to do with the input file name!
No, I can't! It has nothing to do with the input file name!
You mean that it has nothing to do with the output file name, surely. I don't know why Arrrrrrrrr would think his suggestion was relevant.