normals_Hough
normals_Hough copied to clipboard
Python wrapper does not compile under Windows out of the box
The Python wrapper does not compile under Windows. In this fork I added some quick and dirty fixes you could maybe use.
The issues I encountered:
-
setup.py
does not include thenumpy
's include directory. - The compile flags specified in
setup.py
only apply to GCC, not to MSVC. - MSVC's
math.h
does not defineM_PI
unless_USE_MATH_DEFINES
is defined. - The typedef
kd_tree
uses the matrix typeEigen::MatrixX3d
. This results in theKDTreeEigenMatrixAdaptor
'sIndexType
to be__int64
under MSVC. In MSVC,long int
cannot be converted to__int64
and resulted in type errors at places whereknnSearch()
andlist_of_triplets()
were called. I solved this by introducing a typedefpointIdxType
which is__int64
when using MSVC andlong int
otherwise.
Hello, Thanks a lot for sharing the fix for Windows.
Hi, is it possible to compile using MinGW in windows? I got two errors during compiling
C:/mingw/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/cmath:1085:11: error: '::copysign' has not been declared
using ::copysign;
^~~~~~~~
In file included from C:/mingw/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/sys/stat.h:26,
from C:\Python3.7\include/pyport.h:224,
from C:\Python3.7\include/Python.h:63,
from src\NormalEstimatorHough.cpp:4:
C:/mingw/x86_64-8.1.0-release-posix-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/sys/types.h:68:16: error: conflicting declaration 'typedef _pid_t pid_t'
typedef _pid_t pid_t;
^~~~~
In file included from C:\Python3.7\include/Python.h:8,
from src\NormalEstimatorHough.cpp:4:
C:\Python3.7\include/pyconfig.h:187:13: note: previous declaration as 'typedef int pid_t'
typedef int pid_t;