Reputation: 1141
I want to make c extension for python. I know basics of C, and i want to make extensions because of better performance. I dont know Visual Studio and C very well. So please be considerate.
I searched to much but i didnt find any working solution. When i am trying to
#include <Python.h>
file, it is saying it cant find it. What should i do?
Upvotes: 0
Views: 230
Reputation: 36106
MS has a document dedicated to your exact case, with step-by-step instructions: Write C++ extensions for Python - Visual Studio | Microsoft Docs
In brief, you
pythonXY.dll
as per Link against a 3rd-party library with Visual Studio.pyd
extension.py
files in it, e.g. setup.py
.pyd
before running the Python project and make it available for Python code in it.Note that there's no further integration with distutils, pytest, tox and whatnot.
Upvotes: 1