You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear all
I tried to build Boost.NumPy with python3.4, np 1.8.1 and boost 1.55.0 on ubuntu
First build with CMake-init.sh went right but when i tried to "make" in the created build directory I came up againt an error when building the wrap.cpp.o in the example directory?
[ 68%] Building CXX object libs/numpy/example/CMakeFiles/wrap.dir/wrap.cpp.o
../libs/numpy/example/wrap.cpp: In function ‘int main(int, char**)’:
../libs/numpy/example/wrap.cpp:114:40: error: ‘initexample’ was not declared in this scope
PyImport_AppendInittab("example", &initexample);
^
make[2]: *** [libs/numpy/example/CMakeFiles/wrap.dir/wrap.cpp.o] Erreur 1
make[1]: *** [libs/numpy/example/CMakeFiles/wrap.dir/all] Erreur 2
make: *** [all] Erreur 2
In boost/python/module_init.hpp, the name of this initation function is generated as init + example (module name) for Python2 and PyInit_ + example (module name) for Python3.
When I replace initexample with PyInit_example, it works.
This function name is generated as a part of function definition,
and there is no macro to generate function name only.
Only way to avoid this is to switch the function name using preprocessor:
Activity
termoshtt commentedon Sep 22, 2014
In
boost/python/module_init.hpp, the name of this initation function is generated asinit+example(module name) for Python2 andPyInit_+example(module name) for Python3.When I replace
initexamplewithPyInit_example, it works.This function name is generated as a part of function definition,
and there is no macro to generate function name only.
Only way to avoid this is to switch the function name using preprocessor:
TallJimbo commentedon Sep 10, 2015
Fixed in #39.