【发布时间】: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++ 项目中时,我在 make 命令期间遇到很多错误。
【问题讨论】:
-
欢迎来到 Stackoverflow!请考虑提供Minimal, Reproducible Example 来演示该问题,并为此问题提供更多背景信息。
标签: c++ node.js cmake nan pybind11