Tag: boost

build立NodeJs模块(或任何其他库)

我想用C ++和Ubuntu 13.04构build一个nodejs模块,使用如下所示的一些boost头文件: #include <iostream> #include <string> #include <node/node.h> #include <v8.h> #include <boost/lexical_cast.hpp> using namespace std; using namespace v8; Handle<Value> Method(const Arguments& args) { HandleScope scope; std::string foobar = "8"; return scope.Close(String::New("world")); } void init(Handle<Object> exports){ exports->Set(String::NewSymbol("Hello"), FunctionTemplate::New(Method)->GetFunction()); } NODE_MODULE(hello, init) 但是,使用node-gyp进行编译时,出现以下错误: sam @ ubuntu:〜/ workspace_cpp / NodeTest / src $ node-gyp build gyp info如果以ok结束,它就会工作gyp […]

使用Boost的Node-gyp包含和库目录

我试图在我的Windows 7机器上使用Boost库中的一些类来构build一个Node C ++插件。 但是,运行后 node-gyp configure 成功地,当我运行时,我不断遭到缺less头文件的攻击 node-gyp build 与我包括的各种Boost标题有关。 我尝试在由“configure”创build的Visual Studio项目中手动设置include和库目录,但无济于事。 如何确定包含node-gyp的目录? [编辑]经过与node-gyp混淆,取得了一点成功,我探讨了通过Visual Studio构buildNode模块,事实certificate,几个小时后,终于开始工作了。 感谢您的帮助。