I'm trying to get a demo working writing PCM to the I2S; I've created a small demo program that gives an error when I run with the following command
can't open /dev/mem
So I run with the this command
sudo ./demo stereo_small.wav (added
sudo) and the demo should now be able to run successfully with elevated privileges.
But I now get this error:
./demo: error while loading shared libraries: libsndfile.so.1: cannot open shared object file: No such file or directory
Initially to get the program working I had to execute this command
export LD_LIBRARY_PATH=/usr/local/lib to get it to work, but the error has now retuned but only when I prefix with
Please bare with me I've only been using C & Linux for a few hours!
Here's what i've done to compile and run:
gcc `pkg-config --cflags sndfile` -c demo.c gcc 'pkg-config --libs sndfile' demo.o -o demo sudo ./demo stereo_small.wav
Update - Cause: some environment variables aren't maintained under the SU context see here