title: v8 extension for node.js - cannot set FunctionTemplate to target
body: <p>I'm just starting out with writing a binding to a C library (link-grammar, to be precise) via a v8 extension (following instructions on <a href="http://nodejs.org/docs/v0.5.3/api/addons.html" rel="nofollow">Node.JS docs</a> and <a href="http://code.google.com/apis/v8/embed.html" rel="nofollow">v8 API docs</a>).</p>
  
  <p>My problem is that I am getting the following build error:</p>
  
  <pre><code>/usr/include/v8.h: In constructor âv8::Handle&lt;T&gt;::Handle(v8::Handle&lt;S&gt;) [with S = v8::FunctionTemplate, T = v8::Value]â:
  node.cc:85:68:   instantiated from here
  /usr/include/v8.h:195:5: error: cannot convert âv8::FunctionTemplate*â to âv8::Value* volatileâ in assignment
  </code></pre>
  
  <p>...when trying to build the following code:</p>
  
  <pre><code>#include &lt;v8.h&gt;
  #include &lt;locale.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include "link-includes.h"
  
  using namespace v8;
  
  Dictionary dict;
  Parse_Options opts;
  
  static Handle&lt;Value&gt; v8parse(const Arguments&amp; args)
  {
      /* snip */
  }
  
  extern "C" void init (Handle&lt;Object&gt; target)
  {
      HandleScope scope;
      target-&gt;Set(String::New("parse"), FunctionTemplate::New(v8parse));
  
      setlocale(LC_ALL, "");
      opts = parse_options_create();
      dict = dictionary_create_lang("en");
  }
  </code></pre>
  
  <p>I feel as if I've followed the instructions on the above links, and followed the pattern of the examples they link to, however I get the aforementioned error. Not the sharpest C++ coder out there, so it's very possible the error is staring me in the face. Alas, I'm at a loss.</p>