Hello, I'm trying to build a wrapper for a DepthSense SDK writen Cython but when I run the command python setup.py install this is the output I get:
running install
running build
running build_ext
skipping 'Depthsense.cpp' Cython extension (up-to-date)
building 'depthsense' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/opt/softkinetic/DepthSenseSDK/include -I/usr/include/python2.7 -c Depthsense.cpp -o build/temp.linux-x86_64-2.7/Depthsense.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from /usr/include/python2.7/numpy/ndarraytypes.h:1761:0,
from /usr/include/python2.7/numpy/ndarrayobject.h:17,
from /usr/include/python2.7/numpy/arrayobject.h:4,
from Depthsense.cpp:263:
/usr/include/python2.7/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
Depthsense.cpp: In function ‘PyObject* __pyx_pf_10depthsense_11dsDepthNode_20captureConfiguration___get__(__pyx_obj_10depthsense_dsDepthNode*)’:
Depthsense.cpp:5778:103: error: invalid conversion from ‘uint32_t* {aka unsigned int*}’ to ‘int32_t* {aka int*}’ [-fpermissive]
DepthSense::FrameFormat_toResolution(__pyx_v_config.frameFormat, (&__pyx_v_width), (&__pyx_v_height));
^
In file included from Depthsense.cpp:266:0:
/opt/softkinetic/DepthSenseSDK/include/DepthSense.hxx:285:9: error: initializing argument 2 of ‘void DepthSense::FrameFormat_toResolution(DepthSense::FrameFormat, int32_t*, int32_t*)’ [-fpermissive]
FrameFormat_toResolution (FrameFormat frameFormat, int32_t* width, int32_t* height);
^
Depthsense.cpp:5778:103: error: invalid conversion from ‘uint32_t* {aka unsigned int*}’ to ‘int32_t* {aka int*}’ [-fpermissive]
DepthSense::FrameFormat_toResolution(__pyx_v_config.frameFormat, (&__pyx_v_width), (&__pyx_v_height));
^
In file included from Depthsense.cpp:266:0:
/opt/softkinetic/DepthSenseSDK/include/DepthSense.hxx:285:9: error: initializing argument 3 of ‘void DepthSense::FrameFormat_toResolution(DepthSense::FrameFormat, int32_t*, int32_t*)’ [-fpermissive]
FrameFormat_toResolution (FrameFormat frameFormat, int32_t* width, int32_t* height);
^
In file included from /usr/include/python2.7/numpy/ndarrayobject.h:26:0,
from /usr/include/python2.7/numpy/arrayobject.h:4,
from Depthsense.cpp:263:
/usr/include/python2.7/numpy/__multiarray_api.h: At global scope:
/usr/include/python2.7/numpy/__multiarray_api.h:1629:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
_import_array(void)
^
In file included from /usr/include/python2.7/numpy/ufuncobject.h:327:0,
from Depthsense.cpp:264:
/usr/include/python2.7/numpy/__ufunc_api.h:241:1: warning: ‘int _import_umath()’ defined but not used [-Wunused-function]
_import_umath(void)
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
ext = Extension (
'depthsense', # extension name
['Depthsense.pyx'], # cython source
language = 'c++', # make a c++ file
include_dirs = ['/opt/softkinetic/DepthSenseSDK/include'],
libraries = ['DepthSense'],
library_dirs = ['/opt/softkinetic/DepthSenseSDK/lib/'],
extra_link_args=['-Wl,-rpath=/opt/softkinetic/DepthSenseSDK/lib/'],
)
setup (
name = 'depthsense',
version = '0.1',
ext_package = 'depthsense',
ext_modules = [ext],
cmdclass = {'build_ext' : build_ext}
)
Thanks in advance.