Hi, I try create v8 module to python used boost and i have problem: #include <iostream> using namespace std; #include <stdio.h> #include <stdlib.h> #include <string.h> #include "include/libplatform/libplatform.h" #include "include/v8.h" using namespace v8; const char* say_hello(const char* name) { return name; } #include <boost/python/module.hpp> #include <boost/python/def.hpp> #include <boost/python/class.hpp> using namespace boost::python; BOOST_PYTHON_MODULE(hello) { class_<V8, boost::noncopyable>("V8", no_init) .def("Initialize", &V8::Initialize).staticmethod("Initialize"); def("say_hello", say_hello); } compile process is ok but when i try import hello in python i see error: /hello.so: undefined symbol: _ZN2v82V810InitializeEv Thanks for help
On Feb 5, 2016, at 4:56 AM, Daniel Burchardt <danielburchardt@gmail.com> wrote:
Hi,
I try create v8 module to python used boost and i have problem:
#include <iostream>
using namespace std;
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "include/libplatform/libplatform.h" #include "include/v8.h"
using namespace v8;
const char* say_hello(const char* name) { return name; }
#include <boost/python/module.hpp> #include <boost/python/def.hpp> #include <boost/python/class.hpp>
using namespace boost::python;
BOOST_PYTHON_MODULE(hello) { class_<V8, boost::noncopyable>("V8", no_init) .def("Initialize", &V8::Initialize).staticmethod("Initialize");
def("say_hello", say_hello); }
compile process is ok but when i try import hello in python i see error:
/hello.so: undefined symbol: _ZN2v82V810InitializeEv
I’m not familiar with the structure of V8, but it looks like you need to link your Python module against its library, either statically or dynamically. If it’s dynamically-linked you need to make sure that the shared library loader can find the V8 library at runtime. Jason
participants (2)
-
Daniel Burchardt
-
Jason Roehm