nerd
nerd copied to clipboard
Compilation error __NERD_DIRNAME with fib.js, Debian 12 and pre-compiled nerd v0.0.16
node nerd ../fib-main/fib.js
[*] Generating source file
[*] Compiling with preset: speed
[+] Creating Nerd binary lib for std_linux_0.0.16
g++ -std=c++17 -flto -Ofast -c nerdcore/src/nerd.cpp -o "/home/me/Downloads/nerd-master/.nerd/cached_std_linux_0.0.16/nerd.o"
[+] Compiling with precompiled Nerd lib
/home/me/Downloads/nerd-master/.nerd/uxh7a/fib.cpp: In function ‘int main(int, char**)’:
/home/me/Downloads/nerd-master/.nerd/uxh7a/fib.cpp:77:17: error: ‘__NERD_DIRNAME’ was not declared in this scope
77 | __NERD_DIRNAME = argv_str.substr(0, argv_str.find_last_of("/"));
| ^~~~~~~~~~~~~~
Error: Command failed: g++ -std=c++17 "/home/me/Downloads/nerd-master/.nerd/cached_std_linux_0.0.16/nerd.o" "/home/me/Downloads/nerd-master/.nerd/uxh7a/fib.cpp" -Ofast -flto -pthread -s -o "/home/me/Downloads/nerd-master/fib"
/home/me/Downloads/nerd-master/.nerd/uxh7a/fib.cpp: In function ‘int main(int, char**)’:
/home/me/Downloads/nerd-master/.nerd/uxh7a/fib.cpp:77:17: error: ‘__NERD_DIRNAME’ was not declared in this scope
77 | __NERD_DIRNAME = argv_str.substr(0, argv_str.find_last_of("/"));
| ^~~~~~~~~~~~~~
at checkExecSyncError (node:child_process:890:11)
at execSync (node:child_process:962:15)
at Compiler.Compile (/home/me/Downloads/nerd-master/compiler/native/compiler.js:161:3)
at /home/me/Downloads/nerd-master/nerd.js:481:13
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
status: 1,
signal: null,
output: [
null,
<Buffer >,
<Buffer 2f 68 6f 6d 65 2f 6d 61 74 74 69 2f 44 6f 77 6e 6c 6f 61 64 73 2f 6e 65 72 64 2d 6d 61 73 74 65 72 2f 2e 6e 65 72 64 2f 75 78 68 37 61 2f 66 69 62 2e ... 294 more bytes>
],
pid: 6703,
stdout: <Buffer >,
stderr: <Buffer 2f 68 6f 6d 65 2f 6d 61 74 74 69 2f 44 6f 77 6e 6c 6f 61 64 73 2f 6e 65 72 64 2d 6d 61 73 74 65 72 2f 2e 6e 65 72 64 2f 75 78 68 37 61 2f 66 69 62 2e ... 294 more bytes>
}
[!] Compilation error
fib.js: https://github.com/drujensen/fib