[Csnd] JUCE android and Csound
Date | 2018-12-11 22:28 |
From | Johann Philippe <000002c2c0737523-dmarc-request@LISTSERV.HEANET.IE> |
Subject | [Csnd] JUCE android and Csound |
Dear all, I'm trying to use JUCE since a few weeks. I'm trying to build an app for Android, using JUCE and Csound. And of course, having an issue :) First of all, i checked that my android studio is correctly installed, and could build a JUCE example quite easily. My current app uses only JUCE standard libs, and csound c++ libs (csound.hpp, and csPerfThread.hpp). I could compile the linux makefile easily. For those who don't know JUCE, the JUCE projucer renders build projects for the main platforms. But, when compiling in the android studio, it seems there is the problem linking the csound libraries. In the projucer, the project was configured so that includepath has access to csound.hpp and csPerfThread.hpp (included in my project), and so that linker can link with libcsound64.so and libcsnd6.so (with the -L and -l flags). The output error message (below) seems to indicate that the .so files aren't found or linked correctly. But i'm not really sure why. Did anyone experienced any issue like this when linking any shared library ? Sorry if it's a really easy case, but it's my first android project, and, after googling for hours, i don't find any answer adapted to this issue. / Build command failed. Error while executing process /home/johann/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /home/johann/JUCE/Projects/touchApp/Builds/Android/app/.externalNativeBuild/cmake/debug_Debug/x86 --target juce_jni} [1/2] Building CXX object CMakeFiles/juce_jni.dir/home/johann/JUCE/Projects/touchApp/Source/Main.cpp.o [2/2] Linking CXX shared library ../../../../build/intermediates/cmake/debug_/debug/obj/x86/libjuce_jni.so FAILED: : && /home/johann/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=i686-none-linux-android24 --gcc-toolchain=/home/johann/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64 --sysroot=/home/johann/Android/Sdk/ndk-bundle/sysroot -fPIC -isystem /home/johann/Android/Sdk/ndk-bundle/sysroot/usr/include/i686-linux-android -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fexceptions -frtti -fsigned-char -std=gnu++14 -I/usr/local/include/csound -O0 -fno-limit-debug-info -O0 -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot /home/johann/Android/Sdk/ndk-bundle/platforms/android-24/arch-x86 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -L/home/johann/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86 -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-z,nocopyreloc -pie -fPIE -L/home/johann/csound/cs6make -L/usr/local/lib -shared -Wl,-soname,libjuce_jni.so -o ../../../../build/intermediates/cmake/debug_/debug/obj/x86/libjuce_jni.so CMakeFiles/juce_jni.dir/home/johann/JUCE/Projects/touchApp/Source/Main.cpp.o CMakeFiles/juce_jni.dir/home/johann/JUCE/Projects/touchApp/JuceLibraryCode/include_juce_core.cpp.o CMakeFiles/juce_jni.dir/home/johann/JUCE/Projects/touchApp/JuceLibraryCode/include_juce_data_structures.cpp.o CMakeFiles/juce_jni.dir/home/johann/JUCE/Projects/touchApp/JuceLibraryCode/include_juce_events.cpp.o CMakeFiles/juce_jni.dir/home/johann/JUCE/Projects/touchApp/JuceLibraryCode/include_juce_graphics.cpp.o CMakeFiles/juce_jni.dir/home/johann/JUCE/Projects/touchApp/JuceLibraryCode/include_juce_gui_basics.cpp.o /home/johann/Android/Sdk/ndk-bundle/platforms/android-24/arch-x86/usr/lib/liblog.so /home/johann/Android/Sdk/ndk-bundle/platforms/android-24/arch-x86/usr/lib/libandroid.so /home/johann/Android/Sdk/ndk-bundle/platforms/android-24/arch-x86/usr/lib/libGLESv3.so /home/johann/Android/Sdk/ndk-bundle/platforms/android-24/arch-x86/usr/lib/libEGL.so libcpufeatures.a -latomic -lm "/home/johann/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86/libc++_static.a" "/home/johann/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86/libc++abi.a" && : /home/johann/JUCE/Projects/touchApp/Source/MultiTouchDemo.h:78: error: undefined reference to 'CsoundPerformanceThread::CsoundPerformanceThread(Csound*)' /home/johann/JUCE/Projects/touchApp/Source/MultiTouchDemo.h:79: error: undefined reference to 'CsoundPerformanceThread::Play()' /usr/local/include/csound/csound.hpp:834: error: undefined reference to 'csoundCreate' /usr/local/include/csound/csound.hpp:118: error: undefined reference to 'csoundInitializeCscore' /usr/local/include/csound/csound.hpp:122: error: undefined reference to 'csoundGetVersion' /usr/local/include/csound/csound.hpp:126: error: undefined reference to 'csoundGetAPIVersion' /usr/local/include/csound/csound.hpp:130: error: undefined reference to 'csoundGetHostData' /usr/local/include/csound/csound.hpp:134: error: undefined reference to 'csoundSetHostData' /usr/local/include/csound/csound.hpp:138: error: undefined reference to 'csoundGetEnv' /usr/local/include/csound/csound.hpp:142: error: undefined reference to 'csoundSetGlobalEnv' /usr/local/include/csound/csound.hpp:146: error: undefined reference to 'csoundSetOption' /usr/local/include/csound/csound.hpp:149: error: undefined reference to 'csoundSetParams' /usr/local/include/csound/csound.hpp:152: error: undefined reference to 'csoundGetParams' /usr/local/include/csound/csound.hpp:155: error: undefined reference to 'csoundSetOutput' /usr/local/include/csound/csound.hpp:158: error: undefined reference to 'csoundSetInput' /usr/local/include/csound/csound.hpp:161: error: undefined reference to 'csoundSetMIDIInput' /usr/local/include/csound/csound.hpp:164: error: undefined reference to 'csoundSetMIDIFileInput' /usr/local/include/csound/csound.hpp:167: error: undefined reference to 'csoundSetMIDIOutput' /usr/local/include/csound/csound.hpp:170: error: undefined reference to 'csoundSetMIDIFileOutput' /usr/local/include/csound/csound.hpp:174: error: undefined reference to 'csoundParseOrc' /usr/local/include/csound/csound.hpp:178: error: undefined reference to 'csoundCompileTree' /usr/local/include/csound/csound.hpp:182: error: undefined reference to 'csoundDeleteTree' /usr/local/include/csound/csound.hpp:186: error: undefined reference to 'csoundCompileOrc' /usr/local/include/csound/csound.hpp:190: error: undefined reference to 'csoundEvalCode' /usr/local/include/csound/csound.hpp:194: error: undefined reference to 'csoundReadScore' /usr/local/include/csound/csound.hpp:198: error: undefined reference to 'csoundCompileArgs' /usr/local/include/csound/csound.hpp:202: error: undefined reference to 'csoundCompile' /usr/local/include/csound/csound.hpp:210: error: undefined reference to 'csoundCompile' /usr/local/include/csound/csound.hpp:219: error: undefined reference to 'csoundCompile' /usr/local/include/csound/csound.hpp:229: error: undefined reference to 'csoundCompile' /usr/local/include/csound/csound.hpp:257: error: undefined reference to 'csoundCompileCsd' /usr/local/include/csound/csound.hpp:261: error: undefined reference to 'csoundCompileCsdText' /usr/local/include/csound/csound.hpp:265: error: undefined reference to 'csoundStart' /usr/local/include/csound/csound.hpp:269: error: undefined reference to 'csoundPerform' /usr/local/include/csound/csound.hpp:275: error: undefined reference to 'csoundPerform' /usr/local/include/csound/csound.hpp:277: error: undefined reference to 'csoundCleanup' /usr/local/include/csound/csound.hpp:289: error: undefined reference to 'csoundPerform' /usr/local/include/csound/csound.hpp:291: error: undefined reference to 'csoundCleanup' /usr/local/include/csound/csound.hpp:304: error: undefined reference to 'csoundPerform' /usr/local/include/csound/csound.hpp:306: error: undefined reference to 'csoundCleanup' /usr/local/include/csound/csound.hpp:322: error: undefined reference to 'csoundCleanup' /usr/local/include/csound/csound.hpp:363: error: undefined reference to 'csoundPerformKsmps' /usr/local/include/csound/csound.hpp:367: error: undefined reference to 'csoundPerformBuffer' /usr/local/include/csound/csound.hpp:371: error: undefined reference to 'csoundStop' /usr/local/include/csound/csound.hpp:379: error: undefined reference to 'csoundReset' /usr/local/include/csound/csound.hpp:383: error: undefined reference to 'csoundGetSr' /usr/local/include/csound/csound.hpp:387: error: undefined reference to 'csoundGetKr' /usr/local/include/csound/csound.hpp:391: error: undefined reference to 'csoundGetKsmps' /usr/local/include/csound/csound.hpp:395: error: undefined reference to 'csoundGetNchnls' /usr/local/include/csound/csound.hpp:399: error: undefined reference to 'csoundGetNchnlsInput' /usr/local/include/csound/csound.hpp:403: error: undefined reference to 'csoundGet0dBFS' /usr/local/include/csound/csound.hpp:407: error: undefined reference to 'csoundGetInputBufferSize' /usr/local/include/csound/csound.hpp:411: error: undefined reference to 'csoundGetOutputBufferSize' /usr/local/include/csound/csound.hpp:415: error: undefined reference to 'csoundGetInputBuffer' /usr/local/include/csound/csound.hpp:419: error: undefined reference to 'csoundGetOutputBuffer' /usr/local/include/csound/csound.hpp:423: error: undefined reference to 'csoundGetSpin' /usr/local/include/csound/csound.hpp:427: error: undefined reference to 'csoundGetSpout' /usr/local/include/csound/csound.hpp:431: error: undefined reference to 'csoundGetOutputName' /usr/local/include/csound/csound.hpp:434: error: undefined reference to 'csoundGetCurrentTimeSamples' /usr/local/include/csound/csound.hpp:438: error: undefined reference to 'csoundSetHostImplementedAudioIO' /usr/local/include/csound/csound.hpp:442: error: undefined reference to 'csoundSetHostImplementedMIDIIO' /usr/local/include/csound/csound.hpp:446: error: undefined reference to 'csoundGetScoreTime' /usr/local/include/csound/csound.hpp:450: error: undefined reference to 'csoundIsScorePending' /usr/local/include/csound/csound.hpp:454: error: undefined reference to 'csoundSetScorePending' /usr/local/include/csound/csound.hpp:458: error: undefined reference to 'csoundGetScoreOffsetSeconds' /usr/local/include/csound/csound.hpp:462: error: undefined reference to 'csoundSetScoreOffsetSeconds' /usr/local/include/csound/csound.hpp:466: error: undefined reference to 'csoundRewindScore' /usr/local/include/csound/csound.hpp:470: error: undefined reference to 'csoundSetCscoreCallback' /usr/local/include/csound/csound.hpp:474: error: undefined reference to 'csoundScoreSort' /usr/local/include/csound/csound.hpp:478: error: undefined reference to 'csoundScoreExtract' /usr/local/include/csound/csound.hpp:484: error: undefined reference to 'csoundMessageV' /usr/local/include/csound/csound.hpp:491: error: undefined reference to 'csoundMessageV' /usr/local/include/csound/csound.hpp:496: error: undefined reference to 'csoundMessageV' /usr/local/include/csound/csound.hpp:502: error: undefined reference to 'csoundSetMessageCallback' /usr/local/include/csound/csound.hpp:506: error: undefined reference to 'csoundGetMessageLevel' /usr/local/include/csound/csound.hpp:510: error: undefined reference to 'csoundSetMessageLevel' /usr/local/include/csound/csound.hpp:514: error: undefined reference to 'csoundInputMessage' /usr/local/include/csound/csound.hpp:518: error: undefined reference to 'csoundKeyPress' /usr/local/include/csound/csound.hpp:522: error: undefined reference to 'csoundScoreEvent' /usr/local/include/csound/csound.hpp:527: error: undefined reference to 'csoundScoreEventAbsolute' /usr/local/include/csound/csound.hpp:532: error: undefined reference to 'csoundSetExternalMidiInOpenCallback' /usr/local/include/csound/csound.hpp:537: error: undefined reference to 'csoundSetExternalMidiReadCallback' /usr/local/include/csound/csound.hpp:542: error: undefined reference to 'csoundSetExternalMidiInCloseCallback' /usr/local/include/csound/csound.hpp:547: error: undefined reference to 'csoundSetExternalMidiOutOpenCallback' /usr/local/include/csound/csound.hpp:552: error: undefined reference to 'csoundSetExternalMidiWriteCallback' /usr/local/include/csound/csound.hpp:557: error: undefined reference to 'csoundSetExternalMidiOutCloseCallback' /usr/local/include/csound/csound.hpp:562: error: undefined reference to 'csoundSetExternalMidiErrorStringCallback' /usr/local/include/csound/csound.hpp:566: error: undefined reference to 'csoundSetIsGraphable' /usr/local/include/csound/csound.hpp:571: error: undefined reference to 'csoundSetMakeGraphCallback' /usr/local/include/csound/csound.hpp:576: error: undefined reference to 'csoundSetDrawGraphCallback' /usr/local/include/csound/csound.hpp:581: error: undefined reference to 'csoundSetKillGraphCallback' /usr/local/include/csound/csound.hpp:586: error: undefined reference to 'csoundSetExitGraphCallback' /usr/local/include/csound/csound.hpp:592: error: undefined reference to 'csoundNewOpcodeList' /usr/local/include/csound/csound.hpp:598: error: undefined reference to 'csoundDisposeOpcodeList' /usr/local/include/csound/csound.hpp:607: error: undefined reference to 'csoundAppendOpcode' /usr/local/include/csound/csound.hpp:612: error: undefined reference to 'csoundSetYieldCallback' /usr/local/include/csound/csound.hpp:617: error: undefined reference to 'csoundSetPlayopenCallback' /usr/local/include/csound/csound.hpp:622: error: undefined reference to 'csoundSetRtplayCallback' /usr/local/include/csound/csound.hpp:627: error: undefined reference to 'csoundSetRecopenCallback' /usr/local/include/csound/csound.hpp:632: error: undefined reference to 'csoundSetRtrecordCallback' /usr/local/include/csound/csound.hpp:637: error: undefined reference to 'csoundSetRtcloseCallback' /usr/local/include/csound/csound.hpp:641: error: undefined reference to 'csoundGetDebug' /usr/local/include/csound/csound.hpp:645: error: undefined reference to 'csoundSetDebug' /usr/local/include/csound/csound.hpp:649: error: undefined reference to 'csoundTableLength' /usr/local/include/csound/csound.hpp:653: error: undefined reference to 'csoundTableGet' /usr/local/include/csound/csound.hpp:657: error: undefined reference to 'csoundTableSet' /usr/local/include/csound/csound.hpp:663: error: undefined reference to 'csoundGetTable' /usr/local/include/csound/csound.hpp:668: error: undefined reference to 'csoundTableCopyOut' /usr/local/include/csound/csound.hpp:671: error: undefined reference to 'csoundTableCopyIn' /usr/local/include/csound/csound.hpp:675: error: undefined reference to 'csoundCreateGlobalVariable' /usr/local/include/csound/csound.hpp:679: error: undefined reference to 'csoundQueryGlobalVariable' /usr/local/include/csound/csound.hpp:683: error: undefined reference to 'csoundQueryGlobalVariableNoCheck' /usr/local/include/csound/csound.hpp:687: error: undefined reference to 'csoundDestroyGlobalVariable' /usr/local/include/csound/csound.hpp:691: error: undefined reference to 'csoundGetRtRecordUserData' /usr/local/include/csound/csound.hpp:695: error: undefined reference to 'csoundGetRtPlayUserData' /usr/local/include/csound/csound.hpp:700: error: undefined reference to 'csoundRegisterSenseEventCallback' /usr/local/include/csound/csound.hpp:704: error: undefined reference to 'csoundRunUtility' /usr/local/include/csound/csound.hpp:708: error: undefined reference to 'csoundListUtilities' /usr/local/include/csound/csound.hpp:712: error: undefined reference to 'csoundDeleteUtilityList' /usr/local/include/csound/csound.hpp:716: error: undefined reference to 'csoundGetUtilityDescription' /usr/local/include/csound/csound.hpp:723: error: undefined reference to 'csoundGetChannelPtr' /usr/local/include/csound/csound.hpp:731: error: undefined reference to 'csoundListChannels' /usr/local/include/csound/csound.hpp:737: error: undefined reference to 'csoundDeleteChannelList' /usr/local/include/csound/csound.hpp:742: error: undefined reference to 'csoundSetControlChannelHints' /usr/local/include/csound/csound.hpp:746: error: undefined reference to 'csoundGetControlChannelHints' /usr/local/include/csound/csound.hpp:750: error: undefined reference to 'csoundSetControlChannel' /usr/local/include/csound/csound.hpp:754: error: undefined reference to 'csoundSetControlChannel' /usr/local/include/csound/csound.hpp:758: error: undefined reference to 'csoundSetStringChannel' /usr/local/include/csound/csound.hpp:762: error: undefined reference to 'csoundSetStringChannel' /usr/local/include/csound/csound.hpp:766: error: undefined reference to 'csoundSetAudioChannel' /usr/local/include/csound/csound.hpp:770: error: undefined reference to 'csoundGetControlChannel' /usr/local/include/csound/csound.hpp:774: error: undefined reference to 'csoundGetControlChannel' /usr/local/include/csound/csound.hpp:778: error: undefined reference to 'csoundGetStringChannel' /usr/local/include/csound/csound.hpp:782: error: undefined reference to 'csoundGetAudioChannel' /usr/local/include/csound/csound.hpp:786: error: undefined reference to 'csoundSetPvsChannel' /usr/local/include/csound/csound.hpp:791: error: undefined reference to 'csoundGetPvsChannel' /usr/local/include/csound/csound.hpp:795: error: undefined reference to 'csoundSetInputChannelCallback' /usr/local/include/csound/csound.hpp:799: error: undefined reference to 'csoundSetOutputChannelCallback' /usr/local/include/csound/csound.hpp:809: error: undefined reference to 'csoundCreateConfigurationVariable' /usr/local/include/csound/csound.hpp:814: error: undefined reference to 'csoundSetConfigurationVariable' /usr/local/include/csound/csound.hpp:818: error: undefined reference to 'csoundParseConfigurationVariable' /usr/local/include/csound/csound.hpp:822: error: undefined reference to 'csoundQueryConfigurationVariable' /usr/local/include/csound/csound.hpp:826: error: undefined reference to 'csoundListConfigurationVariables' /usr/local/include/csound/csound.hpp:830: error: undefined reference to 'csoundDeleteConfigurationVariable' /usr/local/include/csound/csound.hpp:872: error: undefined reference to 'csoundDestroy' /usr/local/include/csound/csound.hpp:881: error: undefined reference to 'csoundCreateMessageBuffer' /usr/local/include/csound/csound.hpp:885: error: undefined reference to 'csoundGetFirstMessage' /usr/local/include/csound/csound.hpp:889: error: undefined reference to 'csoundGetFirstMessageAttr' /usr/local/include/csound/csound.hpp:893: error: undefined reference to 'csoundPopFirstMessage' /usr/local/include/csound/csound.hpp:897: error: undefined reference to 'csoundGetMessageCnt' /usr/local/include/csound/csound.hpp:901: error: undefined reference to 'csoundDestroyMessageBuffer' /usr/local/include/csound/csound.hpp:905: error: undefined reference to 'csoundAddSpinSample' /usr/local/include/csound/csound.hpp:909: error: undefined reference to 'csoundGetSpoutSample' /usr/local/include/csound/csound.hpp:913: error: undefined reference to 'csoundGetInputName' clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. / -- Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2018-12-12 10:31 |
From | Rory Walsh |
Subject | Re: [Csnd] JUCE android and Csound |
Hey Johann. I've never tried mixing JUCE and Csound on Android so I'm not sure what to suggest. It certainly looks like the library isn't being found. I assume that you've set up the correct library and header paths in the Projucer Android project page? What I would probably do at this point is leave JUCE aside and try to create the simplest of Csound Android apps on its own first. Once you have that running on Android Studio you should be able to use the same settings for your JUCE project. Keep us posted. On Tue, 11 Dec 2018 at 22:28, Johann Philippe <000002c2c0737523-dmarc-request@listserv.heanet.ie> wrote: Dear all, |
Date | 2018-12-12 10:38 |
From | Tarmo Johannes |
Subject | Re: [Csnd] JUCE android and Csound |
Hi, I have successfully used Csound on Android with Qt framework and I believe it should work with Juce as well. One idea to check - are you sure you are linking against libcsound64.so for android (the one from csound-android package) and one found in your desktop? The line -L/home/johann/csound/cs6make tells that this might happen. Of course, I don't know what is in there. Anyway, make sure that the correct libraries for arm architecture are used. tarmo Kontakt Rory Walsh (<rorywalsh@ear.ie>) kirjutas kuupäeval K, 12. detsember 2018 kell 12:31:
|
Date | 2018-12-12 20:50 |
From | Johann Philippe <000002c2c0737523-dmarc-request@LISTSERV.HEANET.IE> |
Subject | Re: [Csnd] JUCE android and Csound |
Hi, thanks for the answers ! Of course, i didn't realize i was trying to build with linking the standard desktop c/c++ csound libraries. With the csound-android package i read it's possible to use csound C api (so that my app main code doesn't have to change between platforms). But in the pdf manual found in the package, it's not really clear how to use it in Android context (examples are based on csoundObj for Java). Is the import module manipulation described in the manual the same if i do it for C API ? Or maybe just need to link libcsoundandroid.so ? And what header to include ? It seems there is no header in the package. Thanks Johann
Le mercredi 12 décembre 2018 à 11:38:35 UTC+1, Tarmo Johannes <trmjhnns@GMAIL.COM> a écrit :
Hi, I have successfully used Csound on Android with Qt framework and I believe it should work with Juce as well. One idea to check - are you sure you are linking against libcsound64.so for android (the one from csound-android package) and one found in your desktop? The line -L/home/johann/csound/cs6make tells that this might happen. Of course, I don't know what is in there. Anyway, make sure that the correct libraries for arm architecture are used. tarmo Kontakt Rory Walsh (<rorywalsh@ear.ie>) kirjutas kuupäeval K, 12. detsember 2018 kell 12:31:
|
Date | 2018-12-12 21:21 |
From | Rory Walsh |
Subject | Re: [Csnd] JUCE android and Csound |
Take a look through these: It's old code now but I don't expect much has changed. I need to revisit this soon myself, so I'm interested in knowing how you get on. On Wed, 12 Dec 2018 at 20:50, Johann Philippe <000002c2c0737523-dmarc-request@listserv.heanet.ie> wrote:
|
Date | 2018-12-12 22:37 |
From | Johann Philippe <000002c2c0737523-dmarc-request@LISTSERV.HEANET.IE> |
Subject | Re: [Csnd] JUCE android and Csound |
Thank you for the example, i'll read it in details tomorow. To be sure, in this example, using the AndroidCsound.cpp and .hpp and linking the app build with libcsoundandroid.so (and libsndfile) was ok ? I think if it worked, i should still be working now ! And of course, i'll keep you in touch about this. Thanks Johann
Le mercredi 12 décembre 2018 à 22:22:06 UTC+1, Rory Walsh <rorywalsh@EAR.IE> a écrit :
Take a look through these: It's old code now but I don't expect much has changed. I need to revisit this soon myself, so I'm interested in knowing how you get on. On Wed, 12 Dec 2018 at 20:50, Johann Philippe <000002c2c0737523-dmarc-request@listserv.heanet.ie> wrote:
|
Date | 2018-12-15 21:20 |
From | Johann Philippe <000002c2c0737523-dmarc-request@LISTSERV.HEANET.IE> |
Subject | Re: [Csnd] JUCE android and Csound |
I finally could build the application only changing a few lines to the CMakeLists and the build.gradle of the android project. To the CMakeLists, i added the two lines below (add_library and set_target_properties, with my own path to libcsoundandroid.so), and put the androcsnd in the target_link_libraries. add_library(androcsnd SHARED IMPORTED) And in the build.gradle (Module:app), i configured the cFlags and cppFlags so that it matches the includepath i needed : path to AndroidCsound.hpp and path to csound.hpp (actually, it can be done with the Projucer if you don't want edit the fils yourself). Also, i configured the abiFilters so that it matches the right processor type. The build runs well. The problem is that, since android studio mainly provides emulators for x86 architecture (while i could find online that most phone processors are arm64-v8a or armeabi-v7a), i can't emulate the resultant APK on my computer (there are some arm emulators, but not working well here). Also, for some mysterious reasons, the USB debug with my phone returns "Device supports, but APL only supports arm64-v8a" in the Select Deployment Target of the android studio (or armeabi-v7a if i change the compile targets). Last thing I tried was to create a release build (instead of debug) to put it on my phone, but i could figure it's not that easy with all the android secure stuff which i'm currently not really aware of. Well, the build runs well, but i'm stucked here with my apk that i can't run ... I'll give a try in the next week to solve this. I think the easy way to emulate the application would be to build csoundandroid for x86 arch (and then rebuild the app with abiFilters x86). Is there some parameter in the build.sh of the CsoundAndroid or some other file to change to do that ? I'm not really aware of that.. Thanks in advance Johann
Le mercredi 12 décembre 2018 à 23:38:04 UTC+1, Johann Philippe <000002c2c0737523-dmarc-request@LISTSERV.HEANET.IE> a écrit :
Thank you for the example, i'll read it in details tomorow. To be sure, in this example, using the AndroidCsound.cpp and .hpp and linking the app build with libcsoundandroid.so (and libsndfile) was ok ? I think if it worked, i should still be working now ! And of course, i'll keep you in touch about this. Thanks Johann
Le mercredi 12 décembre 2018 à 22:22:06 UTC+1, Rory Walsh <rorywalsh@EAR.IE> a écrit :
Take a look through these: It's old code now but I don't expect much has changed. I need to revisit this soon myself, so I'm interested in knowing how you get on. On Wed, 12 Dec 2018 at 20:50, Johann Philippe <000002c2c0737523-dmarc-request@listserv.heanet.ie> wrote:
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |