@vic1107, I changed from `emcc` to `emcc.bat` because I have portable
emscripten instead of installed one.
I changed the cpu to amd64, and I got this error:
D:\Installer\nim\lib\nimbase.h:443:64: error:
'Nim_and_C_compiler_disagree_on_target_architecture' declared as an
array
with a negative size
...sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from d:\College\Nim\zmisc\nimcache\stdlib_parseutils.c:9:
D:\Installer\nim\lib\nimbase.h:443:64: In file included from
d:\dev\Nim\zmisc\nimcache\stdlib_system.c:9:
error: D:\Installer\nim\lib\nimbase.h:443:64:
'Nim_and_C_compiler_disagree_on_target_architecture' declared as an
array
with aERROR:root:compiler frontend failed to generate LLVM bitcode,
halting
error: negative size
'Nim_and_C_compiler_disagree_on_target_architecture' declared as an
array
with a
negative size
...sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
...sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
d:\dev\Nim\zmisc\nimcache\stdlib_system.c:11:10: fatal error: 'io.h' file
not found
#include <io.h>
^~~~~~
In file included from d:\dev\Nim\zmisc\nimcache\stdlib_strutils.c:9:
D:\Installer\nim\lib\nimbase.h:443:64: error:
E RROR:root:compiler frontend failed to generate LLVM bitcode, halting
'Nim_and_C_compiler_disagree_on_target_architecture' declared as an array
with a negative size
...sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
CC: stdlib_math
CC: stdlib_algorithm
2 errors generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
In file included from d:\College\Nim\zmisc\nimcache\stdlib_math.c:9:
D:\Installer\nim\lib\nimbase.h:443:64: error:
'Nim_and_C_compiler_disagree_on_target_architecture' declared as an
array
with a negative size
...sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from d:\College\Nim\zmisc\nimcache\stdlib_algorithm.c:9:
D:\Installer\nim\lib\nimbase.h:443:64: error:
'Nim_and_C_compiler_disagree_on_target_architecture' declared as an
array
with a negative size
...sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
Hint: [Link]
ERROR:root:d:\dev\Nim\zmisc\nimcache\stdlib_algorithm.o: No such file or
directory ("d:\dev\Nim\zmisc\nimcache\stdlib_algorithm.o" was expected to be an
input file, based on the commandline arguments provided)
Error: execution of an external program failed: 'emcc.bat -o
d:\dev\Nim\zmisc\araqgc.html d:\dev\Nim\zmisc\nimcache\stdlib_algorithm.o
d:\dev\Nim\zmisc\nimcache\stdlib_math.o
d:\dev\Nim\zmisc\nimcache\stdlib_parseutils.o
d:\dev\Nim\zmisc\nimcache\stdlib_strutils.o
d:\dev\Nim\zmisc\nimcache\stdlib_system.o d:\dev\Nim\zmisc\nimcache\araqgc.o
-s WASM=1 -Lemscripten TOTAL_MEMORY=335544320 '
Is it the error because I defined it using `cpu=amd64`?
I'm sure I'm using 64bit toolchain though.