pmed / v8pp

Bind C++ functions and classes into V8 JavaScript engine
http://pmed.github.io/v8pp/
Other
901 stars 121 forks source link

runtime error for linux #143

Closed syabyr closed 3 years ago

syabyr commented 3 years ago

I use v8 lib from node-v14.0.0,build option: ./configure --with-snapshot --with-intl=none --shared

macos works fine,linux come into this error:

./v8pp_test file.js ./v8pp_test : symbol lookup error: ./file.so: undefined symbol: _ZN2v820EscapableHandleScopeC1EPNS_7IsolateE

pmed commented 3 years ago

Hi,

it might be due missing libv8.so in RPATH of the example file.so

I run this test with explicit LD_LIBRARY_PATH like

# LD_LIBRARY_PATH=<path-to-v8.so>:<path-to-file.so>:$LD_LIBRARY_PATH ./v8pp_test tests/file.js
syabyr commented 3 years ago

add -rdynamic in linking command solved this problem