[Python] compile c++ code into pyd with cython

Discussão em 'Python' iniciado por Stack, Novembro 29, 2024.

  1. Stack

    Stack Membro Participativo

    Cython compiles a python-like code to a C++ Code then it uses gcc/g++ to compile it into a library like pyd.

    Lets say i would write my code in pure C++ then compile it into pyd to use it in Python for example lets say i have the following C++ module

    int sum(int a, int b){
    return a + b
    }


    Is it possible to compile that code into pyd without using something like PyObject, Ctype ... etc? or does the code must be in the first place written with Cython Syntax to be compatible with Python ?

    Continue reading...

Compartilhe esta Página