title: Building NodeJs module with boost (or any other library for that matter)
body: <p>I'm trying to build a nodejs module with C++ and Ubuntu 13.04 using some boost headers as shown below:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;node/node.h&gt;
  #include &lt;v8.h&gt;
  #include &lt;boost/lexical_cast.hpp&gt;
  
  
  
  using namespace std;
  using namespace v8;
  
  
  Handle&lt;Value&gt; Method(const Arguments&amp; args) {
    HandleScope scope;
  
    std::string foobar = "8";
  
    return scope.Close(String::New("world"));
  }
  
  void init(Handle&lt;Object&gt; exports){
  
      exports-&gt;Set(String::NewSymbol("Hello"),
              FunctionTemplate::New(Method)-&gt;GetFunction());
  
  }
  
  NODE_MODULE(hello, init)
  </code></pre>
  
  <p>However, when compiling with node-gyp, I get the following errors:</p>
  
  <blockquote>
    <p>sam@ubuntu:~/workspace_cpp/NodeTest/src$ node-gyp build gyp info it
    worked if it ends with ok gyp info using node-gyp@0.10.9 gyp info
    using node@0.10.15 | linux | x64 gyp info spawn make gyp info spawn
    args [ 'BUILDTYPE=Release', '-C', 'build' ] make: Entering directory
    <code>/home/sam/workspace_cpp/NodeTest/src/build'   CXX(target)
    Release/obj.target/hello/NodeTest.o In file included from
    /usr/include/boost/numeric/conversion/converter.hpp:14:0,
                     from /usr/include/boost/numeric/conversion/cast.hpp:33,
                     from /usr/include/boost/lexical_cast.hpp:66,
                     from ../NodeTest.cpp:13: /usr/include/boost/numeric/conversion/converter_policies.hpp: In
    member function ‘void
    boost::numeric::def_overflow_handler::operator()(boost::numeric::range_check_result)’:
    /usr/include/boost/numeric/conversion/converter_policies.hpp:162:31:
    error: exception handling disabled, use -fexceptions to enable make:
    *** [Release/obj.target/hello/NodeTest.o] Error 1 make: Leaving directory</code>/home/sam/workspace_cpp/NodeTest/src/build' gyp ERR! build
    error  gyp ERR! stack Error: <code>make</code> failed with exit code: 2 gyp ERR!
    stack     at ChildProcess.onExit
    (/usr/local/lib/node_modules/node-gyp/lib/build.js:267:23) gyp ERR!
    stack     at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR!
    stack     at Process.ChildProcess._handle.onexit
    (child_process.js:789:12) gyp ERR! System Linux 3.8.0-19-generic gyp
    ERR! command "node" "/usr/local/bin/node-gyp" "build" gyp ERR! cwd
    /home/sam/workspace_cpp/NodeTest/src gyp ERR! node -v v0.10.15 gyp
    ERR! node-gyp -v v0.10.9 gyp ERR! not ok</p>
  </blockquote>
  
  <p>I cannot find anything on the web for how to get node-gyp to build with other libraries such as boost.  Does anybody have any insight or experience with this?  My ultimate goal is to make a SOAP module using gsoap.</p>
  
  <p><strong>EDIT</strong>
  I'm assuming that I have to edit my binding.gyp file in some way to allow for boost to be compiled.  As it sits, this file currently looks like this:</p>
  
  <pre><code>{   "targets": [
      {
        "target_name": "hello",
        "sources": [ "NodeTest.cpp" ]
      }   ] }
  </code></pre>