如何让 Visual Express 2010 找到我的 python.h 头文件?
我已经进行了搜索,但找不到我要搜索的内容。 我想使用 C++ 和 Visual C++ Express 2010 创建一个 Python 模块。 现在,我需要包含Python.h,但是当我编译时它说找不到Python.h。如何为我的 VC 提供 Python 头文件?
I already did a search, but I just couldn't find what I searched for.
I want to create a Python Module using C++ and Visual C++ Express 2010.
Now, I need to include Python.h, but when I compile it says it couldn't find Python.h. How do I give my VC the Python header file ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
告诉 IDE header 所在位置:
Project ->属性-> C/C++->附加包含目录
Tell IDE where header is located:
Project -> Properties -> C/C++ -> Additional Include Directories
您必须在 IDE 中设置 python 包含文件的路径。导航至
工具|选项|项目和解决方案| VC++ 目录
并在包含目录
下添加路径。You either have to set the path to to the python include files in your IDE. Navigate to
Tools | Options | Projects and Solutions | VC++ Directories
and add the path underInclude Directories
.