Skip to content

Update build instructions #10

Open

Description

@richsad

The README.md files for the examples say to run:
npm build

Doing this does nothing on node.js 0.10.26. However, if you do:
node-gyp configure
node-gyp build

It builds the C++ and then do:

node run.js

You are able to use the examples. You may want to update the docs since in general the people using these examples are total newbs to building native C++ extensions for node (like me!). Thanks a lot for contributing these examples.

Activity

  1. mn1aC commented on Mar 20, 2015

    @mn1aC

    When I do node-gyp build I get:

    CXX(target) Release/obj.target/node-cpphello/cpphello.o
    ../cpphello.cpp:7:32: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle foo(const Arguments& args)
    ^~~~~~~~~
    v8::internal::Arguments
    /Users/sven/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
    class Arguments;
    ^
    ../cpphello.cpp:9:18: error: no member named 'New' in 'v8::String'
    return String::New("Hello World");
    ~~~~~~~~^
    ../cpphello.cpp:14:3: error: no matching function for call to 'NODE_SET_METHOD'
    NODE_SET_METHOD(target, "foo", foo);
    ^~~~~~~~~~~~~~~
    /Users/sven/.node-gyp/0.12.0/src/node.h:240:25: note: expanded from macro 'NODE_SET_METHOD'
    #define NODE_SET_METHOD node::NODE_SET_METHOD
    ^~~~~~~~~~~~~~~~~~~~~
    /Users/sven/.node-gyp/0.12.0/src/node.h:228:13: note: candidate function [with TypeName = v8::Handlev8::Object] not viable: no known conversion from 'Handlev8::Value (const v8::internal::Arguments &)'
    to 'v8::FunctionCallback' (aka 'void (*)(const FunctionCallbackInfov8::Value &)') for 3rd argument
    inline void NODE_SET_METHOD(const TypeName& recv,
    ^
    3 errors generated.

  2. mn1aC commented on Mar 20, 2015

    @mn1aC

    Seems like v8 is not included? How to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions