title: Error: Cannot open shared object file: No such file or directory
body: <p>I was writing C++ Addon for Node.js. Tried to use sample library called libSample.so which has declaration of function printHello:</p>
  
  <pre><code>void printHello() {
      std::cout &lt;&lt; "Hello World\n";
  }
  </code></pre>
  
  <p>It worked fine.(Compiled using <code>node-gyp configure build</code> and executed <code>node ./</code> )</p>
  
  <p>When I tried to use another more complex library called libCore.so. The following error produced when started to execute. Compilation and configure passed find:</p>
  
  <pre><code>module.js:597
    return process.dlopen(module, path._makeLong(filename));
                   ^
  
  Error: libPlayerCore.so: cannot open shared object file: No such file or directory
      at Error (native)
      at Object.Module._extensions..node (module.js:597:18)
      at Module.load (module.js:487:32)
      at tryModuleLoad (module.js:446:12)
      at Function.Module._load (module.js:438:3)
      at Module.require (module.js:497:17)
      at require (internal/module.js:20:19)
      at Object.&lt;anonymous&gt; (/home/jasurn/CLionProjects/JsTest/hello.js:2:15)
      at Module._compile (module.js:570:32)
      at Object.Module._extensions..js (module.js:579:10)
  </code></pre>
  
  <p>some piece of usage libCore.so</p>
  
  <pre><code>    //#include &lt;core.h&gt; definition of core library lies in this header
      void CreateObject(const FunctionCallbackInfo&lt;Value&gt;&amp; args) {
          Isolate* isolate = args.GetIsolate();
          Local&lt;Object&gt; obj = Object::New(isolate);
          obj-&gt;Set(String::NewFromUtf8(isolate, "msg"), args[0]-&gt;ToString());
          //usage of core library
          Core core;
          args.GetReturnValue().Set(obj);
      }
  </code></pre>
  
  <p>The binding.gyp file: the path is correct, because it is worked with another library :)</p>
  
  <pre><code>{
    "targets": [
      {
        "target_name": "addon",
        "sources": [ "hello.cc" ],
        "libraries": [
          "/home/jasurn/CLionProjects/JsTest/libPlayerCore/lib/libCore.so"
                  ]
      }
    ]
  }
  </code></pre>
  
  <p>I will be appreciated for answers or suggestions! </p>