3D그래픽2011. 9. 16. 13:18
Bullet Physics를 android에서 사용하기 위해 NDK를 이용하여 build를 하려고 했는데, 수많은 난관이 있었다.

이와 관련하여 몇 가지 정리.


▶ 처음에 빌드를 해 보려고 하는데 STL 관련하여 문제가 있다는것을 발견해서, 이런저런 블로그 글들을 찾아보면서 STLport를 빌드해 보려고 발버둥을 쳤으나 시간낭비. 포기한 상태에서 계속 검색을 하고 있었는데 완전 소중한 link를 발견했다! 바로 android NDK에 STL을 포함한 다양한 부분에서 추가/개선을 해 만들어낸 customized android NDK! 이 NDK를 이용하면 STL 문제없이 빌드가 가능하다.


▶ Bullet Physics를 빌드하려면 libGLESv2.so를 링크해야 하는데, 계속해서 파일을 찾이 못하는 문제가 발생했다. NDK sample에 보면 hello-gl2 라는 예제가 있어서 그것을 가지고 실험(?) 해본 결과, default.properties파일의 유/무에 따라 빌드의 성공 여부가 갈렸다. 이 파일의 내용은 다음과 같다.

# This file is automatically generated by Android Tools.

# Do not modify this file -- YOUR CHANGES WILL BE ERASED!

#

# This file must be checked in Version Control Systems.

#

# To customize properties used by the Ant build system use,

# "build.properties", and override values to adapt the script to your

# project structure.


# Project target.

target=android-8


아마도, target이 지정되지 않으면, 어떤 libGLESv2.so 파일을 사용해야 하는지 명확하지 않아서 발생하는 문제인것 같다.


▶ 아래는 소중한 link를 걸어준 원본 글의 내용이다. : )

You need to add a line of the form:

LOCAL_SHARED_LIBRARIES=libstlport.so

AND you should add libstlport.so to your Application.mk APP_MODULES list, if you want it to be built as part of the same build process.

OR you can do it the easy way and use the Crystax build of the NDK, which makes STL work correctly. See: http://www.crystax.net/android/ndk.php


'3D그래픽' 카테고리의 다른 글

Skin Deformation (or Skinning) in COLLADA (번역)  (0) 2011.10.10
GLSurfaceView.Renderer interface  (1) 2011.09.29
Phong Shading  (0) 2011.09.10
Bézier, Gouraud, Fresnel 의 발음  (0) 2011.09.08
Transforms (변환 행렬)  (0) 2011.09.06
Posted by 세월의돌