This commit is contained in:
wangjiyu 2025-04-10 16:54:02 +08:00
parent cf447a85d2
commit 9683dfa7f4
2 changed files with 9 additions and 2 deletions

View File

@ -1,7 +1,10 @@
// 在文件顶部定义唯一符号(关键!)
#define PY_ARRAY_UNIQUE_SYMBOL rtc_plugins_ARRAY_API
// rtc_plugins.cpp
#define PY_ARRAY_UNIQUE_SYMBOL MY_PROJECT_ARRAY_API // 必须与头文件一致
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <Python.h>
#include <numpy/arrayobject.h>
#include "./util/RTCContext.h"

View File

@ -1,6 +1,10 @@
// RTCContext.h
#pragma once
// 必须在所有include之前定义
#define PY_ARRAY_UNIQUE_SYMBOL MY_PROJECT_ARRAY_API // 必须是项目唯一名称
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include "IMRTCEngine.hpp"
#include "MRTCEngineDefine.hpp"
#include "IMRTCEngineFactory.hpp"