【问题标题】:Pybind11 + nan Node module conflictingPybind11 + nan Node 模块冲突
【发布时间】:2020-03-13 22:17:09
【问题描述】:
/usr/include/python3.5m/node.h:19:20: error: expected constructor, destructor, or type conversion before 'PyNode_New'
 PyAPI_FUNC(node *) PyNode_New(int type);
                    ^
/usr/include/python3.5m/node.h:20:17: error: expected constructor, destructor, or type conversion before 'PyNode_AddChild'
 PyAPI_FUNC(int) PyNode_AddChild(node *n, int type,
                 ^
/usr/include/python3.5m/node.h:22:18: error: expected constructor, destructor, or type conversion before 'PyNode_Free'
 PyAPI_FUNC(void) PyNode_Free(node *n);
                  ^
/usr/include/python3.5m/node.h:24:11: error: expected constructor, destructor, or type conversion before '(' token
 PyAPI_FUNC(Py_ssize_t) _PyNode_SizeOf(node *n);
           ^

在将 pybind11 添加到使用“nan”节点模块与 node.js 交互的现有 C++ 项目中时,我在 ma​​ke 命令期间遇到很多错误。

【问题讨论】:

标签: c++ node.js cmake nan pybind11


【解决方案1】:

This solution 为我工作。这与我面临的问题有关。

【讨论】:

    猜你喜欢
    • 2022-01-17
    • 1970-01-01
    • 2012-03-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-21
    • 2021-08-26
    相关资源
    最近更新 更多