libEGL.so not found in android-ndk-r6 on mac os 10.7.3

330 views
Skip to first unread message

brucewuu

unread,
Mar 13, 2012, 4:25:00 AM3/13/12
to android-ndk
I write a c library with opengl es 2.0 , and build with android-ndk-r6
on mac os 10.7, then I met libEGL.so not found , but when I tried with
android-ndk-r7b , there is another issue . I can build them into
test.so ,
but when I run my android application, it says no native function
implementation found , I checked the test.so , I could not find the
symbols of the functions I defined in the c source files , but I am
sure the package path is right , and I tried on ubuntu , there is no
such problem , and I also try to build my c library into static
library test.a , and I checked the symbols are defined in test.a ,
while not in test.so . it is very strange , i use the ar and ranlib
from android-ndk-r7b to package the library .
here is the error log when I build with r6 , and link the
project .

/Users/brucewuu1988/programming/kanzi/androidndk/android-ndk-r6/
toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/../lib/
gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/
ld: warning: libstdc++.so, needed by /Users/brucewuu1988/programming/
kanzi/androidndk/android-ndk-r6/platforms/android-8/arch-arm/usr/lib/
liblog.so, not found (try using -rpath or -rpath-link)
/Users/brucewuu1988/programming/kanzi/androidndk/android-ndk-r6/
toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/../lib/
gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/
ld: warning: libcutils.so, needed by /Users/brucewuu1988/programming/
kanzi/androidndk/android-ndk-r6/platforms/android-8/arch-arm/usr/lib/
libGLESv2.so, not found (try using -rpath or -rpath-link)
/Users/brucewuu1988/programming/kanzi/androidndk/android-ndk-r6/
toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/../lib/
gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/
ld: warning: libEGL.so, needed by /Users/brucewuu1988/programming/
kanzi/androidndk/android-ndk-r6/platforms/android-8/arch-arm/usr/lib/
libGLESv2.so, not found (try using -rpath or -rpath-link)
/Users/brucewuu1988/programming/kanzi/androidndk/android-ndk-r6/
toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/../lib/
gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/
ld: warning: cannot find entry symbol _start; defaulting to 00012fa0
/Users/brucewuu1988/programming/kanzi/androidndk/android-ndk-r6/
platforms/android-8/arch-arm/usr/lib/libGLESv2.so: undefined reference
to `android::egl_get_image_for_current_context(void*)'


anyone knows why and tell me some solution , thanks very much .

David Turner

unread,
Mar 13, 2012, 5:33:58 AM3/13/12
to andro...@googlegroups.com
I recommend setting up a standalone toolchain binary with a sysroot / API level that matches your needs (libEGL.so is only available since API level 9, iirc) instead of calling the binaries directly from $NDK/toolchains/...

See docs/STANDALONE-TOOLCHAIN.html for details.

Also,

"""ld: warning: cannot find entry symbol _start; defaulting to 00012fa0"""

means that you're likely trying to build an executable instead of a shared library.



--
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.


Reply all
Reply to author
Forward
0 new messages