[PD] using bob~ with libpd for android
Alexandre Torres Porres
porres at gmail.com
Fri Jun 23 15:53:57 CEST 2017
2017-06-23 10:25 GMT-03:00 Dan Wilcox <danomatika at gmail.com>:
>
> I believe the Android build uses Android.mk and not the main Makefile.
>
Yeah, that seems to be the thing that happens. In my project folder I have
the PdCore/jni/libpd/Android.mk file with build instructions.
Looking inside, I see it’s building the included externals but I think it’s
> missing the LIBPD_EXTRA define which is used to tell libpd to automatically
> call the setup function for the externals ie. bob~, bonk~, choice, etc.
>
I don't see *LIBPD_EXTRA* either
Is Android Studio building libpd via the Android.mk file? I haven’t done
> any Android development, so I’m not sure. If it is, you can try
> adding -DLIBPD_EXTRA to the end of line 38 in Android.mk and rebuilding.
>
This leaves me with:
"PD_CFLAGS := -DPD -DHAVE_UNISTD_H -DHAVE_LIBDL -DUSEAPI_DUMMY -w
DLIBPD_EXTRA "
To build the "extra" binaries, I go to the PdCore folder on the terminal
and do "~/Library/Android/sdk/ndk-bundle/ndk-build". So, when I try to
build it now, I get the error:
"clang: *error: *no such file or directory: 'DLIBPD_EXTRA'"
So then I tried:
"PD_CFLAGS := -DPD -DHAVE_UNISTD_H -DHAVE_LIBDL -DUSEAPI_DUMMY -w
*-*DLIBPD_EXTRA
"
Now, when building, it does something, it seems to compile the basic
internals, then I get an error. Oh, and now I see I don't have anymore the
compiled .so binaries I did have before for the extra objects, so they got
deleted/cleaned up somehow in this process.
This is the error I get, btw:
[armeabi] SharedLibrary : libpd.so
jni/libpd/libpd_wrapper/z_libpd.c:92: error: undefined reference to
'bob_tilde_setup'
jni/libpd/libpd_wrapper/z_libpd.c:93: error: undefined reference to
'bonk_tilde_setup'
jni/libpd/libpd_wrapper/z_libpd.c:94: error: undefined reference to
'choice_setup'
jni/libpd/libpd_wrapper/z_libpd.c:95: error: undefined reference to
'fiddle_tilde_setup'
jni/libpd/libpd_wrapper/z_libpd.c:96: error: undefined reference to
'loop_tilde_setup'
jni/libpd/libpd_wrapper/z_libpd.c:97: error: undefined reference to
'lrshift_tilde_setup'
jni/libpd/libpd_wrapper/z_libpd.c:98: error: undefined reference to
'pique_setup'
jni/libpd/libpd_wrapper/z_libpd.c:99: error: undefined reference to
'sigmund_tilde_setup'
jni/libpd/libpd_wrapper/z_libpd.c:100: error: undefined reference to
'stdout_setup'
clang++: *error: *linker command failed with exit code 1 (use -v to see
invocation)
make: *** [obj/local/armeabi/libpd.so] Error 1
Also, I’ve opened an issue on GitHub: https://github.com/
> libpd/libpd/issues/175
>
thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20170623/bfa331b5/attachment.html>
More information about the Pd-list
mailing list