Tutorial by Examples

Things are easy when you have to use a C++ library in a Python project. Just you can use Boost. First of all here is a list of components you need: A CMakeList.txt file, because you're going to use CMake. The C++ files of the C++ project. The python file - this is your python project. Let's...
If a function returns a std::vector type, and it is exposed to Python directly like std::vector<float> secondMethod() { return std::vector<float>(); } BOOST_PYTHON_MODULE(CppProject) { boost::python::def("getEmptyVec", secondMethod); } then when the functions...

Page 1 of 1