boost-python Questions

0

I'm developing a Python binding for a C++ library using Boost Python. To avoid having issues distributing the Boost libraries, I'm using the static versions. It works fine in Linux and MacOSX, but ...
Oman asked 27/6, 2019 at 19:35

13

Solved

I am working on an application which uses Boost.Python to embed the Python interpreter. This is used to run user-generated "scripts" which interact with the main program. Unfortunately, one user i...

1

I have a class that inherits from a boost-python class: class Magnet(CMagnet): # CMagnet is a C++ based boost-python class def __init__(self): CMagnet.__init__(self) def python_method(self): ...
Eustazio asked 24/5, 2019 at 11:46

1

Solved

I am attempting to use Boost Python for a project. I have downloaded and build version 1.70 on Windows 10, and I am using Visual Studio Code. When attempting to import boost into my c++ project wit...
Mayan asked 28/5, 2019 at 21:46

2

Solved

I use several versions of Python on my computer : 2.6.6, 2.7.6 and 2.7.9. When I compile Boost with boost-python, I have to give the Python to use in argument. If I want compatibility, have I to co...
Florie asked 3/3, 2015 at 11:26

1

Solved

I have both boost and boost-python installed via brew on my MacOS 10.12 Sierra. However, boost-python doesn't seem to think that its dependency boost is installed: $ brew info boost boost: stable ...
Illusive asked 27/12, 2018 at 17:2

1

Solved

I have successfully followed this example for how to connect C++ and python. It works fine when I use the given Makefile. When I try to use cmake instead, it does not go as well. C++ Code: #inclu...
Maite asked 22/10, 2018 at 12:15

2

Solved

Suppose I have a Python class like so: class MyPythonClass: def Func1(self, param): return def Func2(self, strParam): return strParam If I want to embed the Python script that contains that ...
Swanger asked 10/2, 2017 at 3:6

4

Solved

So I'm trying to interface python 3.2 and c++ using boost python, and have come across many many issues. I've finally gotten it to compile using the 2.7 libraries and it works, but I can't seem to ...
Schlenger asked 25/8, 2011 at 19:16

1

Solved

On Mac, I want to build the example Boost.Python code hello.cpp #include <boost/python.hpp> char const* greet() { return "hello, world"; } BOOST_PYTHON_MODULE(hello_ext) { using namespa...
Esqueda asked 18/8, 2018 at 6:54

3

I install boost using brew install --build-from-source --with-python --fresh -vd boost. Yet when I run make pycaffe in the Caffe project, I get this error: ld: library not found for -lboost_python....
Whipping asked 4/10, 2014 at 2:33

3

Solved

I am trying to build a really trivial example with Boost.Python. I have installed boost and boost-python with homebrew. I am using python 3.4.3 and boost 1.59. My OS is El Capitan. Boost.Python wa...
Penzance asked 11/11, 2015 at 14:45

4

Solved

I'd like to know what version of python boost_python.so is expecting. This is on a computer with multiple python versions and I did not build/install boost myself (nor do i have root access). How ...
Lesley asked 22/12, 2011 at 19:31

3

Solved

While trying to do a simple call by reference from python into a C++ class method: class Foo { protected: int _internalVal; public: Foo() : _internalVal(5){} void getVal(int& val_io) {val_...
Bronwyn asked 5/12, 2012 at 16:58

1

Solved

Suppose I want to get the reference to some global / internal c++ object, one method is to declare function with boost::python::return_value_policy<reference_existing_object>(). Both GetGlob...
Wendling asked 6/4, 2018 at 11:49

6

Solved

I have a method in c++ that gets called from python and needs to return a python list object. I have already created the method, and its attached to an exposed class and callable from python right...
Noumenon asked 27/5, 2011 at 20:32

2

Solved

I have a boost.python project that I compile using cmake and make. It's part of a python module, and I want to be able to install that module using distutils. I have followed the instructions here ...
Ardellardella asked 21/8, 2013 at 14:30

2

Solved

My project includes a large C++ library and Python bindings (via Boost.Python). The test suite is mostly written on top of the Python bindings, and I would like to run it with sanitizers, starting ...
Idol asked 3/12, 2017 at 13:54

1

Solved

I am considering port of a complex code from boost::python to pybind11, but I am puzzled by the absence of something like boost::python::extract<...>().check(). I read pybind11::cast<T>...
Summerwood asked 4/11, 2016 at 13:0

2

I have the following simple hierarchy of two C++ exceptions: class LIB_EXP ClusterException : public std::exception { public: ClusterException() { } ClusterException(const std::string& what)...
Kandi asked 26/9, 2017 at 7:41

1

Solved

SPOILER: partially solved (see at the end). Here is an example of code using Python embedded: #include <Python.h> int main(int argc, char** argv) { Py_SetPythonHome(argv[1]); Py_Initializ...
Gynandrous asked 11/8, 2017 at 15:4

1

I am trying to setup and compile the Hello World example for Boost.Python: http://www.boost.org/doc/libs/1_57_0/libs/python/doc/tutorial/doc/html/python/hello.html I installed bjam, boost, boost-b...
Mosesmosey asked 17/2, 2015 at 21:40

1

Solved

I have built the Boost 1.64.0 Python libraries, using MS Visual Studio Professional 2017 and 32-bit Python 3.4. Now, when I write an application against the resulting library, I'm getting the follo...
Raimondo asked 7/8, 2017 at 1:12

3

Solved

I've spent last 2 days trying to launch examples from Boost.Python with the "ImportError: DLL load failed: The specified module could not be found" error, while trying to load compiled (using bjam)...
Cham asked 13/11, 2011 at 12:56

1

Solved

When I use boost::python::tuple or boost::python::dict in main function, the program crash! #define BOOST_PYTHON_STATIC_LIB #include <boost/python.hpp> #include <iostream> #include &lt...
Limnology asked 25/7, 2017 at 14:43

© 2022 - 2024 — McMap. All rights reserved.