[quickjs-devel] QJSC fails when files have a "dot" in their name

  • From: Connor Nolan <connor24nolan@xxxxxxxx>
  • To: "quickjs-devel@xxxxxxxxxxxxx" <quickjs-devel@xxxxxxxxxxxxx>
  • Date: Sun, 1 Sep 2019 16:08:51 +0000

/tmp/out9313.c:5:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ 
before ‘.’ token
 const uint32_t babel.min_size = 1437555;
                     ^
/tmp/out9313.c:7:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ 
before ‘.’ token
 const uint8_t babel.min[1437555] = {
                    ^
/tmp/out9313.c:179803:5: error: ‘main’ redeclared as different kind of symbol
 int main(int argc, char **argv)
     ^~~~
/tmp/out9313.c:179707:15: note: previous definition of ‘main’ was here
 const uint8_t main[737] = {
               ^~~~
/tmp/out9313.c: In function ‘main’:
/tmp/out9313.c:179828:27: error: ‘babel’ undeclared (first use in this function)
   js_std_eval_binary(ctx, babel.min, babel.min_size, 0);
                           ^~~~~
/tmp/out9313.c:179828:27: note: each undeclared identifier is reported only 
once for each function it appears in
/tmp/out9313.c:179829:27: warning: passing argument 2 of ‘js_std_eval_binary’ 
from incompatible pointer type [-Wincompatible-pointer-types]
   js_std_eval_binary(ctx, main, main_size, 0);
                           ^~~~
In file included from /tmp/out9313.c:3:
./quickjs-libc.h:43:56: note: expected ‘const uint8_t *’ {aka ‘const unsigned 
char *’} but argument is of type ‘int (*)(int,  char **)’
 void js_std_eval_binary(JSContext *ctx, const uint8_t *buf, size_t buf_len,
                                         ~~~~~~~~~~~~~~~^~~

Other related posts: