alsa-doc: Examples Are Not Compiling
Hello,
after looking at the documentation and the examples and I noticed that the examples are not compiling.
https://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2pcm_min_8c-example.ht...
$ gcc -Wall main.c In file included from main.c:6: /usr/include/asoundlib.h:1:2: warning: #warning This header is deprecated, use <alsa/asoundlib.h> instead. [-Wcpp] 1 | #warning This header is deprecated, use <alsa/asoundlib.h> instead. | ^~~~~~~ /usr/bin/ld: /tmp/cc1pkxGK.o: in function `main': main.c:(.text+0x5a): undefined reference to `snd_pcm_open' /usr/bin/ld: main.c:(.text+0x6d): undefined reference to `snd_strerror' /usr/bin/ld: main.c:(.text+0xbe): undefined reference to `snd_pcm_set_params' /usr/bin/ld: main.c:(.text+0xd5): undefined reference to `snd_strerror' /usr/bin/ld: main.c:(.text+0x11d): undefined reference to `snd_pcm_writei' /usr/bin/ld: main.c:(.text+0x141): undefined reference to `snd_pcm_recover' /usr/bin/ld: main.c:(.text+0x159): undefined reference to `snd_strerror' /usr/bin/ld: main.c:(.text+0x1bd): undefined reference to `snd_pcm_drain' /usr/bin/ld: main.c:(.text+0x1d0): undefined reference to `snd_strerror' /usr/bin/ld: main.c:(.text+0x1f3): undefined reference to `snd_pcm_close' collect2: error: ld returned 1 exit status
Is there a working version of that example somewhere or can someone help me to get this working?
Regards Björn Försterling bjoern.foersterling@web.de
On 27. 03. 23 19:22, Björn Försterling wrote:
Hello,
after looking at the documentation and the examples and I noticed that the examples are not compiling.
https://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2pcm_min_8c-example.ht...
$ gcc -Wall main.c
gcc -Wall -lasound main.c
Those commands can be compiled using Makefile in alsa-lib/test directory - obtain full alsa-lib's source code (e.g. 'make pcm_min').
Jaroslav
participants (2)
-
Björn Försterling
-
Jaroslav Kysela