Hi Iliya, did you end up solving your issue? As an alternative we could move the question to http://stackoverflow.com/questions/tagged/android-ndk that way it's easier for other to find the answer.
On Wed, Sep 2, 2015 at 4:58 PM Iliya <[email protected]> wrote: > tried this using the same lib names that are used in the makefiles for > jenkins and getting a different error now: > Error:error: cannot find -llibpng_static > ... > > Will try some more playing around with the configs some more > > On Tuesday, 1 September 2015 17:59:53 UTC-5, Johan Euphrosine wrote: > >> Can you try `ldFlags+="-Lpath/to/lib/foo/directory"` in combinaison with >> `ldLibs+=["foo"]`. >> >> See: >> >> https://github.com/googlesamples/android-ndk/blob/ece572d7219eafcfef928748eadfa10ceb23d2d4/hello-thirdparty/app/build.gradle#L24 >> >> https://github.com/googlesamples/android-ndk/blob/ece572d7219eafcfef928748eadfa10ceb23d2d4/hello-thirdparty/app/build.gradle#L36 >> >> >> On Tue, Sep 1, 2015 at 3:57 PM Iliya <[email protected]> wrote: >> >>> Still seem to be getting the same undefined reference errors as before >>> even with the flags set: >>> >>> def libPath = >>> "src/main/jni/src/cocos2d/cocos2dx/platform/third_party/android/prebuilt/" >>> create("arm7") { >>> ndk.abiFilters += "armeabi-v7a" >>> ndk.ldFlags += >>> "-L${file(libPath+"libcurl/libs/armeabi-v7a")}".toString() >>> ndk.ldFlags += >>> "-L${file(libPath+"libjpeg/libs/armeabi-v7a")}".toString() >>> ndk.ldFlags += >>> "-L${file(libPath+"libpng/libs/armeabi-v7a")}".toString() >>> ndk.ldFlags += >>> "-L${file(libPath+"libtiff/libs/armeabi-v7a")}".toString() >>> ndk.ldFlags += >>> "-L${file(libPath+"libwebp/libs/armeabi-v7a")}".toString() >>> } >>> >>> Error:(66) undefined reference to 'png_get_io_ptr' >>> Error:(75) undefined reference to 'png_error' >>> >>> >>> >>> also tried to specify the full path to the files directly with the same >>> error: >>> create("arm7") { >>> ndk.abiFilters += "armeabi-v7a" >>> ndk.ldFlags += >>> "-L${file(libPath+"libcurl/libs/armeabi-v7a/libcurl.a")}".toString() >>> ndk.ldFlags += >>> "-L${file(libPath+"libjpeg/libs/armeabi-v7a/libjpeg.a")}".toString() >>> ndk.ldFlags += >>> "-L${file(libPath+"libpng/libs/armeabi-v7a/libpng.a")}".toString() >>> ndk.ldFlags += >>> "-L${file(libPath+"libtiff/libs/armeabi-v7a/libtiff.a")}".toString() >>> ndk.ldFlags += >>> "-L${file(libPath+"libwebp/libs/armeabi-v7a/libwebp.a")}".toString() >>> } >>> >>> >>> >>> On Friday, 28 August 2015 13:35:53 UTC-5, Johan Euphrosine wrote: >>> >>>> You can link to a prebuild static library with the `ldFlags` option >>>> introduced in gradle-experimental:0.2.0. >>>> >>>> I just published a sample to show how it works (with the google play >>>> services library: that ship as a set of .a for each platform): >>>> >>>> https://github.com/googlesamples/android-ndk/tree/master/hello-thirdparty >>>> >>>> Let me know if that helps. >>>> >>>> On Tue, Aug 25, 2015 at 1:40 PM Iliya <[email protected]> wrote: >>>> >>> I second that. This is the last thing that is keeping us from using >>>>> Android Studio and Eclipse is starting to get on my nerves more and more >>>>> with all the new features available in AS :) >>>>> >>>>> >>>>> On Friday, 7 August 2015 11:00:31 UTC-5, Emanuele Zattin wrote: >>>>>> >>>>>> Is this going to be supported eventually? >>>>>> >>>>>> On Wednesday, July 15, 2015 at 12:24:15 AM UTC+2, Streets Of Boston >>>>>> wrote: >>>>>>> >>>>>>> From here: >>>>>>> http://tools.android.com/tech-docs/new-build-system/gradle-experimental >>>>>>> "*No support for creating and depending on static libraries*" >>>>>>> >>>>>>> On Monday, July 13, 2015 at 9:53:29 PM UTC-4, Nimrod Dayan wrote: >>>>>>>> >>>>>>>> In traditional NDK make file, I can link a prebuilt static library >>>>>>>> and specify its headers directory: >>>>>>>> *Android.mk* >>>>>>>> >>>>>>>> include $(CLEAR_VARS) >>>>>>>> LOCAL_MODULE := somelibrary-prebuilt-static >>>>>>>> LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libsomelibrary.a >>>>>>>> LOCAL_EXPORT_C_INCLUDES := include >>>>>>>> include $(PREBUILT_STATIC_LIBRARY) >>>>>>>> >>>>>>>> How do I do that in build.gradle using the new plugin's DSL? >>>>>>>> >>>>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "adt-dev" group. >>>>> >>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>> >>>> >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "adt-dev" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > You received this message because you are subscribed to the Google Groups > "adt-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
