在C ++ Builder应用程序中嵌入Python

时间:2018-07-22 19:49:39

标签: python c++ c++builder

我的项目是将Python嵌入C ++ Builder应用程序中。我正在使用Python 3.6。

我在“系统包含”路径中添加了Python的Include文件夹,在“库”路径中添加了Python的Libs文件夹:

  

工具>环境选项> 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'

0 个答案:

没有答案