2010-05-18 06:40:36 error: alsa/asoudlib.h : No such file or directory
Bo Li (CHINA)
Message: 89509
I wrirte an sound record and processing program which is compiled OK on my host with GCC. But when I change the compiler to bfin-linux-uclibc-gcc, I got:
root@ubuntu:# bfin-linux-uclibc-gcc -o record.out main.c beamformer.c preprocess.c My_math.c -lasound -ldl -lm
In file included from main.c:6:
preprocess.h:20:28: error: alsa/asoundlib.h: No such file or directory
In file included from main.c:6:
preprocess.h:29: error: expected declaration specifiers or ‘...’ before ‘snd_pcm_uframes_t’
preprocess.h:31: error: expected declaration specifiers or ‘...’ before ‘snd_pcm_uframes_t’
preprocess.h:33: error: expected declaration specifiers or ‘...’ before ‘snd_pcm_uframes_t’
preprocess.h:35: error: expected ‘)’ before ‘*’ token
main.c: In function ‘main’:
main.c:93: error: ‘snd_pcm_t’ undeclared (first use in this function)
main.c:93: error: (Each undeclared identifier is reported only once
main.c:93: error: for each function it appears in.)
main.c:93: error: ‘capture_handle’ undeclared (first use in this function)
main.c:94: error: ‘snd_pcm_uframes_t’ undeclared (first use in this function)
main.c:94: error: expected ‘;’ before ‘period_size’
main.c:97: error: ‘period_size’ undeclared (first use in this function)
main.c:99: error: ‘pcm_buffer_size’ undeclared (first use in this function)
main.c:139: error: ‘SND_PCM_STREAM_CAPTURE’ undeclared (first use in this function)
main.c:172: error: ‘EPIPE’ undeclared (first use in this function)
main.c:186: error: too many arguments to function ‘channelL’
main.c:191: error: too many arguments to function ‘channelR’
In file included from preprocess.c:8:
preprocess.h:20:28: error: alsa/asoundlib.h: No such file or directory
In file included from preprocess.c:8:
preprocess.h:29: error: expected declaration specifiers or ‘...’ before ‘snd_pcm_uframes_t’
preprocess.h:31: error: expected declaration specifiers or ‘...’ before ‘snd_pcm_uframes_t’
preprocess.h:33: error: expected declaration specifiers or ‘...’ before ‘snd_pcm_uframes_t’
preprocess.h:35: error: expected ‘)’ before ‘*’ token
preprocess.c:17: error: expected declaration specifiers or ‘...’ before ‘snd_pcm_uframes_t’
preprocess.c: In function ‘channelL’:
preprocess.c:22: error: ‘period_size’ undeclared (first use in this function)
preprocess.c:22: error: (Each undeclared identifier is reported only once
preprocess.c:22: error: for each function it appears in.)
preprocess.c: At top level:
preprocess.c:35: error: expected declaration specifiers or ‘...’ before ‘snd_pcm_uframes_t’
preprocess.c: In function ‘channelR’:
preprocess.c:40: error: ‘period_size’ undeclared (first use in this function)
preprocess.c: At top level:
preprocess.c:53: error: expected declaration specifiers or ‘...’ before ‘snd_pcm_uframes_t’
preprocess.c: In function ‘pcmcoding’:
preprocess.c:56: error: ‘period_size’ undeclared (first use in this function)
preprocess.c: At top level:
preprocess.c:72: error: expected ‘)’ before ‘*’ token
the alsa/asoundlib.h is not found. In source codes, I included it by: #indclude <alsa/asoundlib.h>".
I want to know what should I modify for bfin-linux-uclibc-gcc compiler?
Any advice will be appreciated.
Regards,
Libo
QuoteReplyEditDelete
2010-05-18 11:52:36 Re: error: alsa/asoudlib.h : No such file or directory
Mike Frysinger (UNITED STATES)
Message: 89513
do not compile things as root
random 3rd party libs are not included in the toolchain. it is up to you to provide them. please read the documentation:
docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:existing_libraries#using_libs_in_external_applications