Код: Выделить всё
void voidFunct() {
printf("voidFunct called!!!\n");
}
Код: Выделить всё
gcc -c LSB.c -o LSB.o
gcc -shared -Wl -o libLSB.so.1 LSB.o
Код: Выделить всё
>>> from ctypes import *
>>> dll = CDLL("./libLSB.so.1")
>>> return = dll.voidFunct()
voidFunct called!!!
>>> print return
17
Подробнее здесь: https://stackoverflow.com/questions/607 ... s-question