some native popular libs: libffmpeg, libfreetype, libjs (spidermonkey), libogg, libpng, libjpg, libOpenJPEG, zlib

216 views
Skip to first unread message

gacon

unread,
Jul 15, 2010, 4:46:20 AM7/15/10
to android-ndk
hi all,

I need some popular libs (I think) for my project: libffmpeg,
libfreetype, libjs (spidermonkey), libogg, libpng, libjpg,
libOpenJPEG, zlib. I don't know if these libs were supported on
android and we can load them from NDK?

Thanks,

appforce.org

unread,
Jul 15, 2010, 7:37:07 AM7/15/10
to android-ndk
Some of these are already in Android's source tree, and you can pick
them up as static libraries. For ffmpeg there are tutorials over the
net, I don't know about SpiderMonkey.

Ngo Van Luyen

unread,
Jul 15, 2010, 9:04:01 AM7/15/10
to andro...@googlegroups.com
Hi,

where we can find these libs in the source tree? I downloaded Android source code from: http://git.source.android.com/?p=platform/frameworks/base.git;a=snapshot;h=HEAD;sf=tgz

thanks,

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.




--
Hello Android!
http://androidcore.com/

Olivier Guilyardi

unread,
Jul 15, 2010, 9:28:37 AM7/15/10
to andro...@googlegroups.com
I don't think you'll find such libs in the frameworks. For libpng, zlib, etc..
check out platform/external/* at http://android.git.kernel.org/

Olivier

On 07/15/2010 03:04 PM, Ngo Van Luyen wrote:
> Hi,
>
> where we can find these libs in the source tree? I downloaded Android
> source code
> from: http://git.source.android.com/?p=platform/frameworks/base.git;a=snapshot;h=HEAD;sf=tgz
>
> thanks,
>
>

> 2010/7/15 appforce.org <http://appforce.org> <ogi.a...@gmail.com
> <mailto:ogi.a...@gmail.com>>


>
> Some of these are already in Android's source tree, and you can pick
> them up as static libraries. For ffmpeg there are tutorials over the
> net, I don't know about SpiderMonkey.
>
> On Jul 15, 11:46 am, gacon <nvluye...@gmail.com

> <mailto:nvluye...@gmail.com>> wrote:
> > hi all,
> >
> > I need some popular libs (I think) for my project: libffmpeg,
> > libfreetype, libjs (spidermonkey), libogg, libpng, libjpg,
> > libOpenJPEG, zlib. I don't know if these libs were supported on
> > android and we can load them from NDK?
> >
> > Thanks,
>
> --
> You received this message because you are subscribed to the Google
> Groups "android-ndk" group.
> To post to this group, send email to andro...@googlegroups.com

> <mailto:andro...@googlegroups.com>.


> To unsubscribe from this group, send email to
> android-ndk...@googlegroups.com

> <mailto:android-ndk%2Bunsu...@googlegroups.com>.

Ngo Van Luyen

unread,
Jul 15, 2010, 10:38:24 AM7/15/10
to andro...@googlegroups.com
got it, thank you Olivier.

But I think that Google'docs (http://source.android.com/source/git-repo.html) should be changed from "curl http://android.git.kernel.org/repo ~/bin/repo"  to "curl http://android.git.kernel.org/repo > ~/bin/repo"

Luyen,

2010/7/15 Olivier Guilyardi <li...@samalyse.com>

Ngo Van Luyen

unread,
Jul 16, 2010, 5:43:11 AM7/16/10
to andro...@googlegroups.com

Hi,

Can someone help me to create Android.mk for libjs (javascript engine / spidermonkey: https://developer.mozilla.org/En/SpiderMonkey/Build_Documentation ). Android.mk was made from Makefile.ref, but I got  lot of error from ndk-build in the code. I also tried to remove *.h from Android, but the same error. I build this lib for Linux, everything is ok.

I attach some necessary mk file.

Thanks,



2010/7/15 Ngo Van Luyen <nvlu...@gmail.com>
hi,

I downloaded some libs from this repository and tried to compiled them. With the libs that have only one include $(BUILD_SHARED_LIBRARY) (or static) in the Android.mk, everything is ok. But with the libs that have more than one include, ex:

[CODE]
LOCAL_MODULE := libz
LOCAL_CFLAGS += -O3 -DUSE_MMAP
LOCAL_SRC_FILES := $(zlib_files)
include $(BUILD_SHARED_LIBRARY)

include $(CLEAR_VARS)

LOCAL_ARM_MODE := arm
LOCAL_MODULE := libz
LOCAL_CFLAGS += -O3 -DUSE_MMAP
LOCAL_SRC_FILES := $(zlib_files)
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
...
[/CODE]

I got the message:

[CODE]
gacon@gacon-laptop:~/workspace/zlibdroid/jni$ ndk-build 
Android NDK: Trying to define local module 'z' in /home/gacon/workspace/zlibdroid/jni/Android.mk.    
Android NDK: But this module was already defined by /home/gacon/workspace/zlibdroid/jni/Android.mk.    
/home/gacon/android/android-ndk-r4b/build/core/build-static-library.mk:33: *** Android NDK: Aborting.    .  Stop.
[/CODE]


How to fix this? Thanks,
Luyen,


2010/7/15 Ngo Van Luyen <nvlu...@gmail.com>



--
Hello Android!
http://androidcore.com/
Android.mk
Makefile.ref
config.mk
Linux_All.mk

Ngo Van Luyen

unread,
Jul 16, 2010, 5:54:14 AM7/16/10
to andro...@googlegroups.com
It's ok now. I forgot to define OS in config file. sorry for bothering you

Luyen,


2010/7/16 Ngo Van Luyen <nvlu...@gmail.com>
Reply all
Reply to author
Forward
0 new messages