I use "wiringPi" to talk over SPI to some device attached to "RaspberryPi".
With test application (simple user mode app) call to function
wiringPiSPISetup() works well, while executed from daemon - fails. Return value is 0 (which indicates error, according to sources/samples of "wiringPi").
Test application that works correctly was written in C, when the daemon - is in C++. I know it has nothing to do with the problem. Just listed all that is different.
The question is what could prevent the
wiringPiSPISetup() from working properly while called from daemon ?
I suspect that shared library of "wiringPi" fails to load due to possible library path problem. But I am not sure how to test this, given rather modest error handling capabilities of "wiringPi".