Adding libpng in android ndk project

前端 未结 1 503
不思量自难忘°
不思量自难忘° 2021-02-03 10:52

I\'ve searched a lot of topics about linking libpng to my android ndk project but I\'ve found right answer for my problem and I hope somebody will help me.

This is hier

相关标签:
1条回答
  • 2021-02-03 11:46

    i've got another way for you:

    1. Download all files from here and paste it into a new folder anywhere on your system:
      https://github.com/julienr/libpng-android

    2. go into the folder and run:
      ./build.sh

    3. You will get an libpng.a file in [YOUR_FOLDER]/obj/local/armeabi/libpng.a
      Copy this file into:
      [YOUR_ANDROID_NDK_FOLDER]/platforms/[ALL_FOLDERS_IN_HERE]/arch-arm/usr/lib/

    4. now you can use libpng in all your projects with the simple line:
      LOCAL_LDLIBS += -lpng

    5. you only have to include this in your cpp's:
      #include <png.h>

    Have fun!

    0 讨论(0)
提交回复
热议问题