[Python] create dll with python and use in c++

Discussão em 'Python' iniciado por Stack, Março 10, 2025.

  1. Stack

    Stack Membro Participativo

    I want to create a DLL from the Python source code I have. For this purpose, there are packages like Nuitka and Cython, which give me a .pyd output—a file similar to a DLL that can be executed in C++ code using the python.h library. However, the Cython package also provides a .c and .h output, which apparently includes the methods from the Python module I mentioned. But when I generate a DLL from these two files, the methods are not included in the DLL. So far, I’ve done these steps but haven’t achieved the desired result. Given this, I specifically need a DLL from Python source code. How can I create a suitable DLL from what I have? Also, if there are other modules you can recommend, please let me know. I’ve also looked into the Elmer module, but it doesn’t seem very interesting to me. If I need to add another file to create the DLL, please suggest it.

    Continue reading...

Compartilhe esta Página