face3d icon indicating copy to clipboard operation
face3d copied to clipboard

Mac compile cython error with mesh_core_cython

Open Ai-is-light opened this issue 6 years ago • 3 comments

 "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

Ai-is-light avatar Dec 09 '18 11:12 Ai-is-light

Could you please give the solution.

GangHu1993 avatar Mar 01 '19 01:03 GangHu1993

CFLAGS='-stdlib=libc++' python setup.py build_ext -i

christopher-beckham avatar Aug 23 '19 04:08 christopher-beckham

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!

huailiang avatar Oct 05 '20 12:10 huailiang