I am trying to play audio using ALSA Lib on iMX6 running Linux. I am using the Minimal Playback Program mentioned here. I am able to compile the program but the Cross GCC Linker gave me linker errors. After researching about the linking errors, I found out that I need to add
-lasound to the linker flags.
After adding the linker flag I am still having errors. The console output is as follows:
16:21:06 **** Incremental Build of configuration Debug for project sound **** make all /home/gcc-linaro-5.2-2015.11-2-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.2.1/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lasound Building target: sound Invoking: Cross GCC Linker collect2: error: ld returned 1 exit status arm-linux-gnueabihf-gcc -L/home/alsa-lib-1.1.2/include -L/srv/nfs/rootfs/usr/lib -Wl,-rpath-link,/srv/nfs/rootfs/usr/lib -L/srv/nfs/rootfs/lib -Wl,-rpath-link,/srv/nfs/rootfs/lib -o "sound" ./play.o -lasound makefile:29: recipe for target 'sound' failed make: *** [sound] Error 1 16:21:06 Build Finished (took 159ms)
Can someone help me resolve this error?
Also, are there any LGPL licensed libraries that could be used for audio playback functionality ?