Game Development Reference
In-Depth Information
Done. Out file is libgltest_jni.so
Check for missing symbols with this code:
user@ubuntu:~/workspace/ch05.OpenGL/native$ make dyn
agcc -c test.c -I/home/user/mydroid/frameworks/base/opengl/include
ald -o gl-dyn test.o -lgltest_jni -L.
arm-none-linux-gnueabi-ld: warning: library search path "/usr/lib/jvm/java-6-
sun/jre/lib/i386" is unsafe for cross-compilation
arm-none-linux-gnueabi-ld: warning: cannot find entry symbol _start; defaulting to 000082e8
Done. Out file is gl-dyn
Note The compiler will complain about the local system JNI headers: “library search path "/usr/lib/jvm/
java-6-sun/jre/lib/i386" is unsafe for cross-compilation.” This message can be ignored.
Finally, the library must be deployed to the device /data folder so the activity can load it:
user@ubuntu:~ ch05.OpenGL/native$ make deploy-test
Deploying libgltest_jni.so to /data
adb push libgltest_jni.so /data
87 KB/s (7389 bytes in 0.082s)
As shown in Figure 5-6, when the project is started in the device, two launchers will be placed in the
device desktop: OpenGL Java and OpenGL Native.
Search WWH ::




Custom Search