While building my Android source code I get this error
cannot find alsa/asoundlib.h
I have already installed libasound2-dev. asoundlib.h is present in usr/include/alsa/ folder but still the builder is not able to find it.
Can anyone tell me that why the compiler is not able to find asoundlib.h? How to add /usr/include to the search path for header files?
If you're using debian
or ubuntu
then running apt-get install libasound2-dev
solves the problem. It installs the needed header files, though you might run into some version incompatibilities. (In which case, the solution is to go back to source and find it.)
Additionally, the package names would vary for different OS versions.
In generally if the development libraries are installed you should be able to find it by running locate asoundlib.h
command.
I had the problem then I found the solution. In external/alsa-lib include they have all the libraries for the alsa-util compiles. However the alsa-util compiles or other alsa related programs are looking for alsa/*.h libraries where as all the *.h are in the include folder.
Create an alsa folder within the external/alsa-lib/include/ then copy all needed libraries should solve the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With