Re: [C++-sig] Cant Link Boost python example / Re: Cplusplus-sig Digest, Vol 118, Issue 1

2019-05-19 Thread Lewis Evans
Afternoon, We built boost 1.70.0 with python 3.7 just two days ago, and we also encountered the error about pyconfig.h. We resolved it with this env-var export of CPLUS_INCLUDE_PATH: export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/local/miniconda/envs/python3/include/python3.7m/" (you will n

Re: [C++-sig] "cmake can't find boost python (Paddy Finn)"

2019-05-21 Thread Lewis Evans
We use cmake and build C++ against boost-python (boost 1.70.0, python 3.7). We set the envvar "BOOST_ROOT" to the correct folder; Include files are in folder %BOOST_ROOT%\boost Libraries are in %BOOST_ROOT%\libs. Once you've done that, cmake's command find_package(Boost REQUIRED_COMPONENTS date_tim

Re: [C++-sig] Compiling boost python

2020-05-01 Thread Lewis Evans
We build boost-python using a simple setup: 1. build boost according to its own instructions 2. cmake to build our C++, using find_package for python and boost libraries we use the latest cmake, find_package with exact required components I personally found bjam tricky to use (very few examples or

Re: [C++-sig] Cplusplus-sig Digest, Vol 125, Issue 3

2020-05-13 Thread Lewis Evans
Hello, I suggest to avoid eval, in main() instead, after "import test" in main(): funcObj = global["test"].attr("test") // assuming your global["test"] is a successfully imported module resultObj = funcObj() then check resultObj: as well as extract-and-check, you can query repr/str, and is_none

Re: [C++-sig] Cplusplus-sig Digest, Vol 125, Issue 5

2020-05-14 Thread Lewis Evans
I suggest (a) renaming as test.test is confusing, eg call the file/module test_file, and the class test_class (b) I think from your previous post that test.test() simply calls the constructor for class test, and this constructor is defined in python, returning an object not a pointer, so perhaps t