[vtkusers] Build Android Example with Eclipse?

Simon 75779910 at qq.com
Thu Jan 21 00:29:33 EST 2016


VTK 7.0rc2

I have successfully built the static libraries(libsxxx.a) and I also built
the three android examples worked fine on my phone.

Now I want to use Eclipse to build the example JavaVTK, and I import the
example, use jni javah to generate .h and add the lib file containning
libsxxx.a, and edit .mk file,use NDK to build the example.I get undefined
reference error.

11:33:43 **** Incremental Build of configuration Default for project
JavaVTKActivity ****
"E:\\MyEclipse\\NDK\\ndk-build.cmd" all 
[armeabi-v7a] Compile++ thumb: JavaVTK <= main.cxx
[armeabi-v7a] SharedLibrary  : libJavaVTK.so
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::TerminateApp() [clone .localalias.28]:
error: undefined reference to 'ANativeActivity_finish'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::ExitCallback(): error: undefined reference
to 'ANativeActivity_finish'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error:
undefined reference to 'AInputEvent_getType'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error:
undefined reference to 'AMotionEvent_getAction'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error:
undefined reference to 'AMotionEvent_getMetaState'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error:
undefined reference to 'AMotionEvent_getPointerCount'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error:
undefined reference to 'AMotionEvent_getPointerId'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error:
undefined reference to 'AMotionEvent_getX'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error:
undefined reference to 'AMotionEvent_getY'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error:
undefined reference to 'AMotionEvent_getPointerId'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error:
undefined reference to 'AKeyEvent_getAction'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error:
undefined reference to 'AKeyEvent_getKeyCode'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error:
undefined reference to 'AKeyEvent_getMetaState'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error:
undefined reference to 'AKeyEvent_getRepeatCount'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::StartEventLoop(): error: undefined
reference to 'ALooper_pollAll'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::StartEventLoop(): error: undefined
reference to 'ANativeWindow_getWidth'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::StartEventLoop(): error: undefined
reference to 'ANativeWindow_getHeight'
jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function
vtkAndroidRenderWindowInteractor::Initialize(): error: undefined reference
to 'ALooper_pollAll'
jni/vtk-android/lib/libvtkCommonDataModel-7.0.a(vtkDataSetAttributes.cxx.o):vtkDataSetAttributes.cxx:function
vtkDataSetAttributes::FieldList::SetField(int, vtkAbstractArray*): error:
undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
jni/vtk-android/lib/libvtkCommonDataModel-7.0.a(vtkDataSetAttributes.cxx.o):vtkDataSetAttributes.cxx:function
vtkDataSetAttributes::InternalCopyAllocate(vtkDataSetAttributes::FieldList&,
int, int, int): error: undefined reference to
'std::__throw_out_of_range_fmt(char const*, ...)'
jni/vtk-android/lib/libvtkCommonCore-7.0.a(vtkAbstractArray.cxx.o):vtkAbstractArray.cxx:function
vtkAbstractArray::SetComponentName(int, char const*): error: undefined
reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
jni/vtk-android/lib/libvtkCommonCore-7.0.a(vtkAbstractArray.cxx.o):vtkAbstractArray.cxx:function
vtkAbstractArray::SetComponentName(int, char const*): error: undefined
reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
collect2.exe: error: ld returned 1 exit status
make.exe: *** [obj/local/armeabi-v7a/libJavaVTK.so] Error 1

11:33:45 Build Finished (took 2s.67ms)





--
View this message in context: http://vtk.1045678.n5.nabble.com/Build-Android-Example-with-Eclipse-tp5736066.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list