Issues about installing PCL in my computer

前端 未结 1 1730
暗喜
暗喜 2021-01-22 12:05

When I try to install python-pcl(PCL is the point cloud library for presentation like laser radar data. I followed the instruction on https://github.com/strawlab/python-pcl ,and

1条回答
  •  后悔当初
    2021-01-22 13:01

    This is a special issue with current MacOS-installations. You could tweak setup.py and add, as the warning suggest, -std=libc++ to the compile-options, i.e.

    from distutils.core import setup
    from Cython.Build import cythonize
    
    ...  some stuff
    
    #passing `-stdlib=libc++` to compiler and linker:
    ext_modules = [Extension(...,
                             language='c++',
                             extra_compile_args=["-stdlib=libc++"], # + anything else you need
                             extra_link_args= ["-stdlib=libc++"] # + anything else you need]
    
    ... some more stuff
    

    I have also added -stdlib=libc++ to the linker options, because it will be probably the next problem you will run into.

    More background: In the MacOS world, for long time, there where two different implementations of c++'s standard library: -libstdc++ associated with gcc and libc++ associated with clang. At the beginning-libstdc++ was also used per default with clang-compiler. However, this is no longer the case - it is not even installed now and that is the reason why the headers cannot be found. I'm not sure why your clang-version doesn't take libc++ per default - so you have to pass it manually to compiler/linker.

    0 讨论(0)
提交回复
热议问题