python - 在 C++Builder 应用程序中嵌入 Python
问题描述
我的项目是将 Python 嵌入到 C++Builder 应用程序中。我正在使用 Python 3.6。
我Include
在 System Include 路径中添加了 Python 的文件Libs
夹,在 Library 路径中添加了 Python 的文件夹:
工具 > 环境选项 > C++ 选项 > 路径和目录
这里是MyUnit1.cpp
:
#include <vcl.h>
#include <Python.h>
#pragma hdrstop
#include "Unit1.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
但我得到这个错误:
[bcc32 错误] Unit1.cpp(4): E2209 无法打开包含文件“Python.h”
解决方案
推荐阅读
- sql - 在 SQL 中将父/子关系记录展平为 1 行(更新)
- tensorflow - 用于加载任意 numpy 张量的 Keras 替代 ImageDataGenerator
- ios - Eureka 表单:更改 TextField 颜色不起作用
- jsf - GlassFish 正在为每个请求创建一个新的 JSESSIONID
- react-native - 如何从反应导航 v3.xx 中的选项卡更新自定义 tabBarComponent 值
- ios - 在 Xcode 中,我收到一个错误,显示为.... -[Dicee_iOS13.ViewController Button:]: unrecognized selector sent to instance 0x7f8fd55092b0
- c# - 找不到类型或命名空间名称“重置”
- c# - 如何在c#中转换带有符号的uint字符串
- laravel - Job' retryUntil 函数似乎没有按预期工作
- python - 如何计算字符串中子字符串的连续重复次数?