Open 4t4nner opened 4 years ago
I am also facing the same issue while making executable of fvadwav.c as "fvadwav" to run wavtest.sh in tests folder.
when I run this : gcc fvadwav.c -o fvadwav
I got the same erro as yours:
/tmp/ccwtRlGE.o: In function process_sf': fvadwav.c:(.text+0x13f): undefined reference to
fvad_process'
fvadwav.c:(.text+0x1ed): undefined reference to sf_write_double' fvadwav.c:(.text+0x242): undefined reference to
sf_read_double'
/tmp/ccwtRlGE.o: In function main': fvadwav.c:(.text+0x505): undefined reference to
fvad_new'
fvadwav.c:(.text+0x5b2): undefined reference to fvad_set_mode' fvadwav.c:(.text+0x79d): undefined reference to
sf_open'
fvadwav.c:(.text+0x7b8): undefined reference to sf_strerror' fvadwav.c:(.text+0x82a): undefined reference to
fvad_set_sample_rate'
fvadwav.c:(.text+0x926): undefined reference to sf_open' fvadwav.c:(.text+0x952): undefined reference to
sf_strerror'
fvadwav.c:(.text+0xaad): undefined reference to sf_close' fvadwav.c:(.text+0xae0): undefined reference to
sf_close'
fvadwav.c:(.text+0xb22): undefined reference to `fvad_free'
collect2: error: ld returned 1 exit status
Can you confirm how did you solve that issue from above command: g++ -v -g fvadwav.c -lsndfile -lfvad
the solution is not working for me even I run your solution I get following error: fvadwav.c: In function ‘bool process_sf(SNDFILE, Fvad, size_t, SNDFILE*, FILE)’: fvadwav.c:32:31: error: invalid conversion from ‘void’ to ‘double’ [-fpermissive] || !(buf0 = malloc(framelen sizeof buf0))
fvadwav.c:33:31: error: invalid conversion from ‘void*’ to ‘int16_t* {aka short int*}’ [-fpermissive]
|| !(buf1 = malloc(framelen * sizeof *buf1))) {
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
fvadwav.c: In function ‘int main(int, char**)’:
fvadwav.c:204:13: sorry, unimplemented: non-trivial designated initializers not supported
};
^
fvadwav.c:204:13: sorry, unimplemented: non-trivial designated initializers not supported
fvadwav.c:204:13: sorry, unimplemented: non-trivial designated initializers not supported
Thanks
Had you "-lsndfile -lfvad" flags in your run attempt?
Thanks for the reply.
Yes It worked for me.
This issue has a fix and can be closed. CC @dpirch
After building and installing I try:
and get an error:
my
/usr/include
is:/usr/local/include
:how can I reproduce your example code without errors?
Update
I found solution
Please, add it to description.