face3d
face3d copied to clipboard
Mac compile cython error with mesh_core_cython
"Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by "
^
mesh_core_cython.cpp:583:10: fatal error: 'ios' file not found
#include "ios"
^~~~~
2 warnings and 1 error generated.
error: command 'gcc' failed with exit status 1
Could you please give the solution.
CFLAGS='-stdlib=libc++' python setup.py build_ext -i
it seems like MacOS 10.10+ cause this kind of problem, so i change 'Extension' in setup.py: ------------------------setup.py:----------------------------- from distutils.core import setup, Extension from Cython.Distutils import build_ext import numpy
setup( name='mesh_core_cython', cmdclass={'build_ext': build_ext}, ext_modules=[Extension("mesh_core_cython", sources=["mesh_core_cython.pyx", "mesh_core.cpp"], language='c++', extra_compile_args=['-stdlib=libc++', '-mmacosx-version-min=10.9','-std=c++11', '-D_hypot=hypot'], extra_link_args=['-stdlib=libc++', '-mmacosx-version-min=10.9','-std=c++11', '-D_hypot=hypot'], include_dirs=[numpy.get_include()])], ) ---------------------------------setup.py--------------------------------------- thx again!