ddiakopoulos / libnyquist

:microphone: Cross platform C++11 library for decoding audio (mp3, wav, ogg, opus, flac, etc)
BSD 2-Clause "Simplified" License
539 stars 66 forks source link

OpusDependencies.c ⇒ implicit declaration of function is invalid in C99 #41

Closed ArthurSonzogni closed 5 years ago

ArthurSonzogni commented 5 years ago

I have one remaining error when I try to use libnyquist with WebAssembly.

Repro steps: Install emscripten SDK. Then:

mkdir build_emscripen
cd build_emscripten
emcmake cmake ..
make -j

Errors:

In file included from /home/sonzogna/programmation/download/libnyquist/src/OpusDependencies.c:96:
/home/sonzogna/programmation/download/libnyquist/third_party/opus/celt/celt_decoder.c:102:11: error: 
      implicit declaration of function 'opus_custom_decoder_get_size' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
   return opus_custom_decoder_get_size(mode, channels);

I am not quite sure what is the problem.

ddiakopoulos commented 5 years ago

@ArthurSonzogni is it required that you compile with -Wimplicit-function-declaration? It's treating the warning as an error in this case

ArthurSonzogni commented 5 years ago

Hmm, I wasn't able before. (I tried).

Things seems to have improved recently. I am now able to make:
https://github.com/ArthurSonzogni/smk to depends on:
https://github.com/ddiakopoulos/libnyquist instead of:
https://github.com/ArthurSonzogni/libnyquist

I guess it means this bug can be closed. I am no more depending on this to be resolved.