Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build instructions #10

Open
richsad opened this issue Mar 7, 2014 · 2 comments
Open

Update build instructions #10

richsad opened this issue Mar 7, 2014 · 2 comments

Comments

@richsad
Copy link

richsad commented Mar 7, 2014

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.

@mn1aC
Copy link

mn1aC commented Mar 20, 2015

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.

@mn1aC
Copy link

mn1aC commented Mar 20, 2015

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants