<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-06-23 10:25 GMT-03:00 Dan Wilcox <span dir="ltr"><<a href="mailto:danomatika@gmail.com" target="_blank">danomatika@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>I believe the Android build uses Android.mk and not the main Makefile.</div></div></blockquote><div><br></div><div>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.</div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px"><br></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div> 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.</div></div></blockquote><div><br></div><div>I don't see <i>LIBPD_EXTRA</i> either</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div>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.<br></div></div></blockquote><div><br></div><div>This leaves me with:<br><br>"PD_CFLAGS := -DPD -DHAVE_UNISTD_H -DHAVE_LIBDL -DUSEAPI_DUMMY -w DLIBPD_EXTRA "</div><div><br></div><div><br class="gmail-Apple-interchange-newline">To build the "extra" binaries, I go to the PdCore folder on the terminal and do "<span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px">~/Library/Android/sdk/ndk-bundle/ndk-build". </span>So, when I try to build it now, I get the error: </div><div>"<span class="gmail-s1">clang: </span><span class="gmail-s2"><b>error: </b></span><span class="gmail-s1">no such file or directory: 'DLIBPD_EXTRA'"</span></div><div><br></div><div>So then I tried: </div><div>"PD_CFLAGS := -DPD -DHAVE_UNISTD_H -DHAVE_LIBDL -DUSEAPI_DUMMY -w <b>-</b>DLIBPD_EXTRA "<br><br></div><div>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.<br><br>This is the error I get, btw: </div><div><br></div><div>







<p class="gmail-p1"><span class="gmail-s1">[armeabi] SharedLibrary  : libpd.so</span></p>
<p class="gmail-p1"><span class="gmail-s1">jni/libpd/libpd_wrapper/z_libpd.c:92: error: undefined reference to 'bob_tilde_setup'</span></p>
<p class="gmail-p1"><span class="gmail-s1">jni/libpd/libpd_wrapper/z_libpd.c:93: error: undefined reference to 'bonk_tilde_setup'</span></p>
<p class="gmail-p1"><span class="gmail-s1">jni/libpd/libpd_wrapper/z_libpd.c:94: error: undefined reference to 'choice_setup'</span></p>
<p class="gmail-p1"><span class="gmail-s1">jni/libpd/libpd_wrapper/z_libpd.c:95: error: undefined reference to 'fiddle_tilde_setup'</span></p>
<p class="gmail-p1"><span class="gmail-s1">jni/libpd/libpd_wrapper/z_libpd.c:96: error: undefined reference to 'loop_tilde_setup'</span></p>
<p class="gmail-p1"><span class="gmail-s1">jni/libpd/libpd_wrapper/z_libpd.c:97: error: undefined reference to 'lrshift_tilde_setup'</span></p>
<p class="gmail-p1"><span class="gmail-s1">jni/libpd/libpd_wrapper/z_libpd.c:98: error: undefined reference to 'pique_setup'</span></p>
<p class="gmail-p1"><span class="gmail-s1">jni/libpd/libpd_wrapper/z_libpd.c:99: error: undefined reference to 'sigmund_tilde_setup'</span></p>
<p class="gmail-p1"><span class="gmail-s1">jni/libpd/libpd_wrapper/z_libpd.c:100: error: undefined reference to 'stdout_setup'</span></p>
<p class="gmail-p1"><span class="gmail-s1">clang++: </span><span class="gmail-s2"><b>error: </b></span><span class="gmail-s1">linker command failed with exit code 1 (use -v to see invocation)</span></p>
<p class="gmail-p1"><span class="gmail-s1">make: *** [obj/local/armeabi/libpd.so] Error 1</span></p><p class="gmail-p1"><br></p></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div></div><div>Also, I’ve opened an issue on GitHub: <a href="https://github.com/libpd/libpd/issues/175" target="_blank">https://github.com/<wbr>libpd/libpd/issues/175</a></div></div></blockquote><div><br></div><div>thanks</div></div></div></div>