Currently experiencing issues with qjsc
.
With qjs index.js
, I receive the expected output:
$ qjs index.js
🎾 Ball hit 1 time(s), wiff!
🎾 Ball hit 2 time(s), waff!
🎾 Ball hit 3 time(s), wiff!
🎾 Ball hit 4 time(s), waff!
🎾 Ball hit 5 time(s), wiff!
🎾 Ball hit 6 time(s), waff!
🎾 Ball hit 7 time(s), wiff!
🎾 Ball hit 8 time(s), waff!
🎾 Ball hit 9 time(s), wiff!
... (ad infinitum)
However when attempting to compile with qjsc
, I receive the following error:
$ qjsc index.js
/tmp/out13043.c:344:16: error: redefinition of 'qjsc_index_size'
const uint32_t qjsc_index_size = 691;
^
/tmp/out13043.c:5:16: note: previous definition is here
const uint32_t qjsc_index_size = 2670;
^
/tmp/out13043.c:346:15: error: redefinition of 'qjsc_index' with a different type: 'const uint8_t [691]'
vs 'const uint8_t [2670]'
const uint8_t qjsc_index[691] = {
^
/tmp/out13043.c:7:15: note: previous definition is here
const uint8_t qjsc_index[2670] = {
^
2 errors generated.
Thank you @Alhadis! I was stuck and your comment was a lightbulb moment for me and pointed me towards the solution 🙌