title: nodejs addon Error: Unable to load shared library
body: <p>I have this simple code of node addon:</p>
  
  <pre><code>#include &lt;node.h&gt;
  #include &lt;v8.h&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  
  template &lt;class S&gt;
  class FooString
  {
    protected:
      static std::vector&lt; S &gt; vec_strings;
  
    public:
      const S &amp;str()  const {  return vec_strings[0]; }
      std::string tostdstring() const;
  };
  
  template &lt;&gt;
  std::string FooString&lt;std::string&gt;::tostdstring() const {  return str();  }
  
  
  namespace v8
  {
    Handle&lt;Value&gt; Method(const Arguments&amp; args) {
      HandleScope scope;
      return scope.Close(String::New("world"));
    }
  
    void init(Handle&lt;Object&gt; target) {
      target-&gt;Set(String::NewSymbol("hello"),
        FunctionTemplate::New(Method)-&gt;GetFunction());
    }
    NODE_MODULE(test, init)
  }
  </code></pre>
  
  <p>it compiles but when I'm runing script which including this addon:</p>
  
  <pre><code>var test = require('./build/Release/test');
  console.log(test.hello()); // 'world'
  </code></pre>
  
  <p>I have got the error message:</p>
  
  <pre><code>node.js:199
          throw e; // process.nextTick error, or 'error' event on first tick
                ^
  Error: Unable to load shared library /home/run/git/addontest/build/Release/test.node
      at Object..node (module.js:474:11)
      at Module.load (module.js:350:32)
      at Function._load (module.js:308:12)
      at Module.require (module.js:356:17)
      at require (module.js:372:17)
      at Object.&lt;anonymous&gt; (/home/run/git/addontest/octonode.js:1:74)
      at Module._compile (module.js:443:26)
      at Object..js (module.js:461:10)
      at Module.load (module.js:350:32)
      at Function._load (module.js:308:12)
  </code></pre>
  
  <p>My g++ version is (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 and nodejs version is v0.7.5-pre</p>
  
  <p>could you check if you have any problems to compile and run this code?</p>