Open holla2040 opened 2 years ago
To fix it
1) mark all declared variables in .h files as 'external' (just add 'external ' (without quotes) before any variable declaration in the .h files when you had an error)
2) declare all the PyObject pointers in the constants.c file (also declare them external in the .h)
3) In soft_pwm.c declare the pthreads_t threads : static pthreads_t threads;
and that did it for me.
Cheers & HTH
Thanks!
debian 11 bullseye Python 3.9.2
sudo python3 setup.py install
linker throws about 50 multiple definition errors
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/home/holla/OPI.GPIO/source/constants.h:30: multiple definition of `pud_off'; build/temp.linux-aarch64-3.9/source/constants.o:/home/holla/OPI.GPIO/source/constants.h:30: first defined here