wave.c example

I’m using QNX RTP on intel machine and can’t get the wave.c example in the
help to compile, basically it gives the following errrors:

/tmp/cc4rBOz9.o: In function main': /tmp/cc4rBOz9.o(.text+0x324): undefined reference to snd_pcm_open_preferred’
/tmp/cc4rBOz9.o(.text+0x363): undefined reference to snd_pcm_open' /tmp/cc4rBOz9.o(.text+0x4a4): undefined reference to snd_pcm_plugin_set_disable’

/tmp/cc4rBOz9.o(.text+0x4c1): undefined reference to snd_strerror' /tmp/cc4rBOz9.o(.text+0x51a): undefined reference to snd_pcm_plugin_info’
/tmp/cc4rBOz9.o(.text+0x537): undefined reference to snd_strerror' /tmp/cc4rBOz9.o(.text+0x605): undefined reference to snd_pcm_plugin_params’
/tmp/cc4rBOz9.o(.text+0x622): undefined reference to snd_strerror' /tmp/cc4rBOz9.o(.text+0x652): undefined reference to snd_pcm_plugin_prepare’
/tmp/cc4rBOz9.o(.text+0x66f): undefined reference to snd_strerror' /tmp/cc4rBOz9.o(.text+0x6c9): undefined reference to snd_pcm_plugin_setup’
/tmp/cc4rBOz9.o(.text+0x6e6): undefined reference to snd_strerror' /tmp/cc4rBOz9.o(.text+0x71a): undefined reference to snd_pcm_get_format_name’
/tmp/cc4rBOz9.o(.text+0x7cc): undefined reference to snd_mixer_open' /tmp/cc4rBOz9.o(.text+0x7e9): undefined reference to snd_strerror’
/tmp/cc4rBOz9.o(.text+0x8ba): undefined reference to
snd_mixer_file_descriptor' /tmp/cc4rBOz9.o(.text+0x8ce): undefined reference to snd_mixer_file_descriptor’
/tmp/cc4rBOz9.o(.text+0x94d): undefined reference to
snd_pcm_file_descriptor' /tmp/cc4rBOz9.o(.text+0x960): undefined reference to snd_pcm_file_descriptor’
/tmp/cc4rBOz9.o(.text+0x9e0): undefined reference to
snd_mixer_file_descriptor' /tmp/cc4rBOz9.o(.text+0x9f3): undefined reference to snd_pcm_file_descriptor’
/tmp/cc4rBOz9.o(.text+0xa0b): undefined reference to
snd_mixer_file_descriptor' /tmp/cc4rBOz9.o(.text+0xa22): undefined reference to snd_pcm_file_descriptor’
/tmp/cc4rBOz9.o(.text+0xa93): undefined reference to snd_mixer_group_read' /tmp/cc4rBOz9.o(.text+0xaab): undefined reference to snd_strerror’
/tmp/cc4rBOz9.o(.text+0xc2a): undefined reference to snd_mixer_group_write' /tmp/cc4rBOz9.o(.text+0xc42): undefined reference to snd_strerror’
/tmp/cc4rBOz9.o(.text+0xd05): undefined reference to
snd_mixer_file_descriptor' /tmp/cc4rBOz9.o(.text+0xd19): undefined reference to snd_mixer_file_descriptor’
/tmp/cc4rBOz9.o(.text+0xd75): undefined reference to snd_mixer_read' /tmp/cc4rBOz9.o(.text+0xd86): undefined reference to snd_pcm_file_descriptor’
/tmp/cc4rBOz9.o(.text+0xd99): undefined reference to
snd_pcm_file_descriptor' /tmp/cc4rBOz9.o(.text+0xe33): undefined reference to snd_pcm_plugin_write’
/tmp/cc4rBOz9.o(.text+0xe7c): undefined reference to snd_pcm_plugin_status' /tmp/cc4rBOz9.o(.text+0xeca): undefined reference to snd_pcm_plugin_prepare’
/tmp/cc4rBOz9.o(.text+0xf32): undefined reference to snd_pcm_plugin_write' /tmp/cc4rBOz9.o(.text+0xf5e): undefined reference to snd_pcm_plugin_flush’
/tmp/cc4rBOz9.o(.text+0xf78): undefined reference to snd_mixer_close' /tmp/cc4rBOz9.o(.text+0xf8c): undefined reference to snd_pcm_close’
collect2: ld returned 1 exit status

…From what I can see it basically can’t find these functions, and yet I
know they’re there…

Any suggestions would be greatly appreciated

Rob Smith

Make sure you are including the library libasound.so when you compile ie:
qcc wave.c /lib/libasound.so


Ryan

Rob wrote:

I’m using QNX RTP on intel machine and can’t get the wave.c example in the
help to compile, basically it gives the following errrors:

/tmp/cc4rBOz9.o: In function main': /tmp/cc4rBOz9.o(.text+0x324): undefined reference to snd_pcm_open_preferred’
/tmp/cc4rBOz9.o(.text+0x363): undefined reference to snd_pcm_open' /tmp/cc4rBOz9.o(.text+0x4a4): undefined reference to snd_pcm_plugin_set_disable’

/tmp/cc4rBOz9.o(.text+0x4c1): undefined reference to snd_strerror' /tmp/cc4rBOz9.o(.text+0x51a): undefined reference to snd_pcm_plugin_info’
/tmp/cc4rBOz9.o(.text+0x537): undefined reference to snd_strerror' /tmp/cc4rBOz9.o(.text+0x605): undefined reference to snd_pcm_plugin_params’
/tmp/cc4rBOz9.o(.text+0x622): undefined reference to snd_strerror' /tmp/cc4rBOz9.o(.text+0x652): undefined reference to snd_pcm_plugin_prepare’
/tmp/cc4rBOz9.o(.text+0x66f): undefined reference to snd_strerror' /tmp/cc4rBOz9.o(.text+0x6c9): undefined reference to snd_pcm_plugin_setup’
/tmp/cc4rBOz9.o(.text+0x6e6): undefined reference to snd_strerror' /tmp/cc4rBOz9.o(.text+0x71a): undefined reference to snd_pcm_get_format_name’
/tmp/cc4rBOz9.o(.text+0x7cc): undefined reference to snd_mixer_open' /tmp/cc4rBOz9.o(.text+0x7e9): undefined reference to snd_strerror’
/tmp/cc4rBOz9.o(.text+0x8ba): undefined reference to
snd_mixer_file_descriptor' /tmp/cc4rBOz9.o(.text+0x8ce): undefined reference to snd_mixer_file_descriptor’
/tmp/cc4rBOz9.o(.text+0x94d): undefined reference to
snd_pcm_file_descriptor' /tmp/cc4rBOz9.o(.text+0x960): undefined reference to snd_pcm_file_descriptor’
/tmp/cc4rBOz9.o(.text+0x9e0): undefined reference to
snd_mixer_file_descriptor' /tmp/cc4rBOz9.o(.text+0x9f3): undefined reference to snd_pcm_file_descriptor’
/tmp/cc4rBOz9.o(.text+0xa0b): undefined reference to
snd_mixer_file_descriptor' /tmp/cc4rBOz9.o(.text+0xa22): undefined reference to snd_pcm_file_descriptor’
/tmp/cc4rBOz9.o(.text+0xa93): undefined reference to snd_mixer_group_read' /tmp/cc4rBOz9.o(.text+0xaab): undefined reference to snd_strerror’
/tmp/cc4rBOz9.o(.text+0xc2a): undefined reference to snd_mixer_group_write' /tmp/cc4rBOz9.o(.text+0xc42): undefined reference to snd_strerror’
/tmp/cc4rBOz9.o(.text+0xd05): undefined reference to
snd_mixer_file_descriptor' /tmp/cc4rBOz9.o(.text+0xd19): undefined reference to snd_mixer_file_descriptor’
/tmp/cc4rBOz9.o(.text+0xd75): undefined reference to snd_mixer_read' /tmp/cc4rBOz9.o(.text+0xd86): undefined reference to snd_pcm_file_descriptor’
/tmp/cc4rBOz9.o(.text+0xd99): undefined reference to
snd_pcm_file_descriptor' /tmp/cc4rBOz9.o(.text+0xe33): undefined reference to snd_pcm_plugin_write’
/tmp/cc4rBOz9.o(.text+0xe7c): undefined reference to snd_pcm_plugin_status' /tmp/cc4rBOz9.o(.text+0xeca): undefined reference to snd_pcm_plugin_prepare’
/tmp/cc4rBOz9.o(.text+0xf32): undefined reference to snd_pcm_plugin_write' /tmp/cc4rBOz9.o(.text+0xf5e): undefined reference to snd_pcm_plugin_flush’
/tmp/cc4rBOz9.o(.text+0xf78): undefined reference to snd_mixer_close' /tmp/cc4rBOz9.o(.text+0xf8c): undefined reference to snd_pcm_close’
collect2: ld returned 1 exit status

…From what I can see it basically can’t find these functions, and yet I
know they’re there…

Any suggestions would be greatly appreciated

Rob Smith