Wrapping C++ Standard library with Cython in ipython

后端 未结 2 2024
旧时难觅i
旧时难觅i 2020-12-21 13:48

According to the Cython documentation ,I write the following cython code as follows:

In [1]:%load_ext Cython
In [2]: %%cython
         from libcpp.vector c         


        
2条回答
  •  醉话见心
    2020-12-21 13:58

    You need to tell cython that you are compiling C++ and not C, through the special comment

    # distutils: language = c++
    

    adding this after the %%cython block will fix your problem.

提交回复
热议问题