$ nelua teste.nelua
generated nelua_cache/teste.c
gcc -o "nelua_cache/teste" "nelua_cache/teste.c" -Wall -lm -fwrapv -g
C compilation for 'nelua_cache/teste' failed:
nelua_cache/teste.c:41:9: error: unknown type name ‘timespec_t’
41 | typedef timespec_t* timespec_t_ptr;
| ^~~~~~~~~~
nelua_cache/teste.c:77:8: error: unknown type name ‘timespec_t’
77 | static timespec_t teste_ts = {0};
| ^~~~~~~~~~
nelua_cache/teste.c: In function ‘nelua_main’:
nelua_cache/teste.c:111:76: error: request for member ‘tv_sec’ in something not a structure or union
111 | strftime((char*)(&teste_buff.data[0]), 100U, __strlit2, gmtime((&teste_ts.tv_sec)));
| ^
nelua_cache/teste.c:112:47: error: request for member ‘tv_nsec’ in something not a structure or union
112 | printf(__strlit3, teste_sbuff.data, teste_ts.tv_nsec);
| ^
This problem was caused because there was no timespec_t declared.
I noticed that there was a
cemitdecl([==[
typedef struct tm tm_t;
]==])
So, I added a typedef struct timespec timespec_t;, which solves the problem:
$ nelua teste.nelua
generated nelua_cache/teste.c
gcc -o "nelua_cache/teste" "nelua_cache/teste.c" -Wall -lm -fwrapv -g
/home/dreunix/Downloads/git/nelua-projs/nelua-raylib/nelua_cache/teste
Current time: 09/21/20 22:55:07.862361753 UTC
Considering this code:
GCC was triggering this message:
This problem was caused because there was no timespec_t declared. I noticed that there was a
So, I added a
typedef struct timespec timespec_t;
, which solves the problem: