chemdataextractor ---- Chemistry Articles NLP Library

GPL Notes

链接库

GCC 使用特例

  • 参考

  • 例外条文

    When you use GCC to compile a program, GCC may combine portions of certain GCC header files and runtime libraries with the compiled program. The purpose of this Exception is to allow compilation of non-GPL (including proprietary) programs to use, in this way, the header files and runtime libraries covered by this Exception.

pybind11 ---- a Python C++ Binding Library

概述

类似 Boost.Python, 不过去掉了对 Boost 库的依赖,更轻便,便于绑定到 python

模块创建

  • 例子

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    
    #include <pybind11/pybind11.h>
    
    int add(int i, int j) {
        return i + j;
    }
    
    PYBIND11_MODULE(example, m) {
        m.doc() = "pybind11 example plugin"; // optional module docstring
    
        m.def("add", &add, "A function which adds two numbers");
    }
  • 重点