breakfastquay / rubberband

Official mirror of Rubber Band Library, an audio time-stretching and pitch-shifting library.
http://breakfastquay.com/rubberband/
GNU General Public License v2.0
561 stars 89 forks source link

Error include static lib for C++ Android #92

Closed dhng22 closed 7 months ago

dhng22 commented 11 months ago

I'm trying to include RubberBand in my JUCE project that build for Android. I built the lib with Meson and got a librubberband.a and successfully loaded with CMake. The header: #include "rubberband/RubberBandStretcher.h" also included in my header file, i can make call to RubberBand's components. But when build the project, i got ld: error: undefined symbol: RubberBand::RubberBandStretcher::available() const, same goes with proccess(), retrieve(),... Is this a bug or i was doing it wrong

cannam commented 11 months ago

From a standpoint of some ignorance (I'm not an Android developer) this looks like a general problem to do with including an additional native library in an Android project.

My first wild guess would be that you have compiled the library and included the header, but not told the application build that it needs to link with the library (however that should be achieved).

My second would be that the library (the .a file) was compiled for a different architecture or using a different toolchain from the rest of the application.

This does not look like a problem specific to Rubber Band.

If any other reader can help, do pipe up.

dhng22 commented 11 months ago

Thanks for your reply. I'm pretty hopeless here but i'll try to figure it out

dhng22 commented 11 months ago

But to my understanding, the library build for Android is the same as Linux which is .a for static and .so for dynamic, so i think i've built the library correctly and just the linking problem