Skip to content

Documented 'hello world' sample does not work for Addons #56173

Closed
@geeksilva97

Description

@geeksilva97

Version

v22.11.0+

Platform

Darwin LM-JNVH7RPW6J 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu10063.141.2~1/RELEASE_ARM64_T6030 arm64

Subsystem

No response

What steps will reproduce the bug?

  1. Go to https://nodejs.org/api/addons.html#hello-world
  2. Copy the sample code into a hello.cc file
  3. Try to build it with node-gyp.

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

N/A

What do you see instead?

Build fails with

../hello.cc:14:27: error: no matching member function for call to 'Set' 

args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world"));

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions