nodejs / node-addon-examples

Node.js C++ addon examples from http://nodejs.org/docs/latest/api/addons.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

/nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ld: /nix/store/9bh3986bpragfjmr32gay8p95k91q4gy-glibc-2.33-47/lib/crt1.o: in function `_start': /build/glibc-2.33/csu/../sysdeps/x86_64/start.S:104: undefined reference to `main' /nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ld: /tmp/ccSAJfYK.o: in function `Init': main.c:(.text+0x6c): undefined reference to `napi_define_properties' /nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ld: /tmp/ccSAJfYK.o: in function `Method': main.c:(.text+0xe4): undefined reference to `napi_create_string_utf8' /nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ld: /tmp/ccSAJfYK.o: in function `_register_NODE_GYP_MODULE_NAME': main.c:(.text.startup+0x8): undefined reference to `napi_module_register' collect2: error: ld returned 1 exit status make: *** [Makefile:2: all] Error 1

TrevorBlythe opened this issue · comments

Heres my file system:

src (this was cloned from the repo)/
main.c/

main.c is simply the copied and pasted hello world node API example.

It doesn't compile.

Is node just broken?? This is the simplest possible example and the code doesn't even work. Am I supposed to know something before hand that wasn't told to me?

Error:
/nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ld: /nix/store/9bh3986bpragfjmr32gay8p95k91q4gy-glibc-2.33-47/lib/crt1.o: in function _start': /build/glibc-2.33/csu/../sysdeps/x86_64/start.S:104: undefined reference to main'
/nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ld: /tmp/ccSAJfYK.o: in function Init': main.c:(.text+0x6c): undefined reference to napi_define_properties'
/nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ld: /tmp/ccSAJfYK.o: in function Method': main.c:(.text+0xe4): undefined reference to napi_create_string_utf8'
/nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ld: /tmp/ccSAJfYK.o: in function _register_NODE_GYP_MODULE_NAME': main.c:(.text.startup+0x8): undefined reference to napi_module_register'
collect2: error: ld returned 1 exit status
make: *** [Makefile:2: all] Error 1