Ask Your Question

Revision history [back]

cant find libopencv_java.so when run.and could compile static library

hi,expert i use OpenCV-2.4.8-android-sdk and android-ndk-r8-crystax-1 to build my .so lib for android project.when i compile in non-static mode,i can success.however,when i compile in static mode that is add OPENCV_LIB_TYPE:=STATIC in android.mk i find errors as follow: "Compile++ thumb : SmokeDetect <= SmokeDetect.cpp SharedLibrary : libSmokeDetect.so D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdIFStream5seekgEy+0x16): error: undefined reference to 'std::istream::seekg(std::fpos<mbstate d:="" android-ndk-r8-crystax-1="" toolchains="" arm-linux-androideabi-4.6="" prebuilt="" windows="" bin="" ..="" lib="" gcc="" arm-linux="" ld.exe:="" ..="" ..="" ..="" sdk="" native="" jni="" ..="" 3rdparty="" libs="" armeabi="" libilmimf.a(imfstdio.cpp.o):="" in="" function="" imf::st="" t._zn3imf11stdosstream5seekpey+0x18):="" error:="" undefined="" reference="" to="" 'std::ostream::seekp(std::fpos<mbstate="" d:="" android-ndk-r8-crystax-1="" toolchains="" arm-linux-androideabi-4.6="" prebuilt="" windows="" bin="" ..="" lib="" gcc="" arm-linux="" ld.exe:="" ..="" ..="" ..="" sdk="" native="" jni="" ..="" 3rdparty="" libs="" armeabi="" libilmimf.a(imfstdio.cpp.o):="" in="" function="" imf::st="" t._zn3imf11stdofstream5seekpey+0x16):="" error:="" undefined="" reference="" to="" 'std::ostream::seekp(std::fpos<mbstate="" collect2:="" ld="" returned="" 1="" exit="" status="" make:="" <em="">* [D:/OpenCV-2.4.8-android-sdk/samples/smokedetect//obj/local/armeabi/libSmokeDetect.so] Error 1

if i use non-static mode,i can get my libSmokeDetect.so successfully.but i use .so in eclipse.when i run in my hardware ,i get errors 04-17 13:34:44.614: E/AndroidRuntime(3148): FATAL EXCEPTION: main 04-17 13:34:44.614: E/AndroidRuntime(3148): java.lang.ExceptionInInitializerError 04-17 13:34:44.614: E/AndroidRuntime(3148): at lxj.a20.smokedetect.SmokedetectActivity.onCreate

(SmokedetectActivity.java:12) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.Activity.performCreate(Activity.java:4465) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.Instrumentation.callActivityOnCreate

(Instrumentation.java:1049) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.ActivityThread.access$600(ActivityThread.java:122) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.os.Handler.dispatchMessage(Handler.java:99) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.os.Looper.loop(Looper.java:137) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.ActivityThread.main(ActivityThread.java:4340) 04-17 13:34:44.614: E/AndroidRuntime(3148): at java.lang.reflect.Method.invokeNative(Native Method) 04-17 13:34:44.614: E/AndroidRuntime(3148): at java.lang.reflect.Method.invoke(Method.java:511) 04-17 13:34:44.614: E/AndroidRuntime(3148): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run

(ZygoteInit.java:784) 04-17 13:34:44.614: E/AndroidRuntime(3148): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 04-17 13:34:44.614: E/AndroidRuntime(3148): at dalvik.system.NativeStart.main(Native Method) 04-17 13:34:44.614: E/AndroidRuntime(3148): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1936]:

85 could not load needed library 'libopencv_java.so' for 'libSmokeDetect.so' (load_library[1091]: Library

'libopencv_java.so' not found) 04-17 13:34:44.614: E/AndroidRuntime(3148): at java.lang.Runtime.loadLibrary(Runtime.java:370) 04-17 13:34:44.614: E/AndroidRuntime(3148): at java.lang.System.loadLibrary(System.java:535) 04-17 13:34:44.614: E/AndroidRuntime(3148): at lxj.a20.smokedetect.LibSmokeDetect.<clinit>(LibSmokeDetect.java:5) 04-17 13:34:44.614: E/AndroidRuntime(3148): ... 15 more

could not find libopencv_java.so

how can i resolve it?any light would be appreciated.thanks any comment.

cant find libopencv_java.so when run.and could compile static library

hi,expert i use OpenCV-2.4.8-android-sdk and android-ndk-r8-crystax-1 to build my .so lib for android project.when i compile in non-static mode,i can success.however,when i compile in static mode that is add OPENCV_LIB_TYPE:=STATIC in android.mk i find errors as follow: "Compile++ thumb : SmokeDetect <= SmokeDetect.cpp SharedLibrary : libSmokeDetect.so follow:

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdIFStream5seekgEy+0x16): error: undefined reference to 'std::istream::seekg(std::fpos<mbstate d:="" android-ndk-r8-crystax-1="" toolchains="" arm-linux-androideabi-4.6="" prebuilt="" windows="" bin="" ..="" lib="" gcc="" arm-linux="" ld.exe:="" ..="" ..="" ..="" sdk="" native="" jni="" ..="" 3rdparty="" libs="" armeabi="" libilmimf.a(imfstdio.cpp.o):="" in="" function="" imf::st="" t._zn3imf11stdosstream5seekpey+0x18):="" error:="" undefined="" reference="" to="" 'std::ostream::seekp(std::fpos<mbstate="" d:="" android-ndk-r8-crystax-1="" toolchains="" arm-linux-androideabi-4.6="" prebuilt="" windows="" bin="" ..="" lib="" gcc="" arm-linux="" ld.exe:="" ..="" ..="" ..="" sdk="" native="" jni="" ..="" 3rdparty="" libs="" armeabi="" libilmimf.a(imfstdio.cpp.o):="" in="" function="" imf::st="" t._zn3imf11stdofstream5seekpey+0x16):="" error:="" undefined="" reference="" to="" 'std::ostream::seekp(std::fpos<mbstate="" collect2:="" ld="" returned="" 1="" exit="" status="" make:="" <em="">* 'std::istream::seekg(std::fpos<mbstate< p="">

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdOSStream5seekpEy+0x18): error: undefined reference to 'std::ostream::seekp(std::fpos<mbstate< p="">

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdOFStream5seekpEy+0x16): error: undefined reference to 'std::ostream::seekp(std::fpos<mbstate< p="">

collect2: ld returned 1 exit status make: * [D:/OpenCV-2.4.8-android-sdk/samples/smokedetect//obj/local/armeabi/libSmokeDetect.so] Error 1

if i use non-static mode,i can get my libSmokeDetect.so successfully.but i use .so in eclipse.when i run in my hardware ,i get errors 04-17 13:34:44.614: E/AndroidRuntime(3148): FATAL EXCEPTION: main 04-17 13:34:44.614: E/AndroidRuntime(3148): errors:

java.lang.ExceptionInInitializerError 04-17 13:34:44.614: E/AndroidRuntime(3148): at lxj.a20.smokedetect.SmokedetectActivity.onCreate

(SmokedetectActivity.java:12) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.Activity.performCreate(Activity.java:4465) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.Instrumentation.callActivityOnCreate

(Instrumentation.java:1049) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.ActivityThread.access$600(ActivityThread.java:122) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.os.Handler.dispatchMessage(Handler.java:99) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.os.Looper.loop(Looper.java:137) 04-17 13:34:44.614: E/AndroidRuntime(3148): at android.app.ActivityThread.main(ActivityThread.java:4340) 04-17 13:34:44.614: E/AndroidRuntime(3148): at java.lang.reflect.Method.invokeNative(Native Method) 04-17 13:34:44.614: E/AndroidRuntime(3148): at java.lang.reflect.Method.invoke(Method.java:511) 04-17 13:34:44.614: E/AndroidRuntime(3148): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run

(ZygoteInit.java:784) 04-17 13:34:44.614: E/AndroidRuntime(3148): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 04-17 13:34:44.614: E/AndroidRuntime(3148): at dalvik.system.NativeStart.main(Native Method) 04-17 13:34:44.614: E/AndroidRuntime(3148): ... Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1936]:

85 could not load needed library 'libopencv_java.so' for 'libSmokeDetect.so' (load_library[1091]: Library

'libopencv_java.so' not found) 04-17 13:34:44.614: E/AndroidRuntime(3148): at java.lang.Runtime.loadLibrary(Runtime.java:370) 04-17 13:34:44.614: E/AndroidRuntime(3148): at java.lang.System.loadLibrary(System.java:535) 04-17 13:34:44.614: E/AndroidRuntime(3148): at lxj.a20.smokedetect.LibSmokeDetect.<clinit>(LibSmokeDetect.java:5) 04-17 13:34:44.614: E/AndroidRuntime(3148): ... 15 more.....

could not find libopencv_java.so

how can i resolve it?any light would be appreciated.thanks any comment.

cant find libopencv_java.so when run.and could compile static library

hi,expert i use OpenCV-2.4.8-android-sdk and android-ndk-r8-crystax-1 to build my .so lib for android project.when i compile in non-static mode,i can success.however,when i compile in static mode that is add OPENCV_LIB_TYPE:=STATIC in android.mk i find errors as follow:

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdIFStream5seekgEy+0x16): error: undefined reference to 'std::istream::seekg(std::fpos<mbstate< p="">

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdOSStream5seekpEy+0x18): error: undefined reference to 'std::ostream::seekp(std::fpos<mbstate< p="">

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdOFStream5seekpEy+0x16): error: undefined reference to 'std::ostream::seekp(std::fpos<mbstate< p="">

collect2: ld returned 1 exit status make: * [D:/OpenCV-2.4.8-android-sdk/samples/smokedetect//obj/local/armeabi/libSmokeDetect.so] Error 1

if i use non-static mode,i can get my libSmokeDetect.so successfully.but i use .so in eclipse.when i run in my hardware ,i get errors:

java.lang.ExceptionInInitializerError ... Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1936]: 85 could not load needed library 'libopencv_java.so' for 'libSmokeDetect.so' (load_library[1091]: Library 'libopencv_java.so' not found) .....

could not find libopencv_java.so

at last ,i add System.loadLibrary("opencv_java"); in my java file.and copy libopencv_java.so into libs of android project.i can pass above error,but a new error as below: OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/highgui/src/window.cpp, line 483

is there bugs in opencv2.4.8?why are there many errors when compile,link in opencv sdk? how can i resolve it?any light would be appreciated.thanks any comment.

cant find libopencv_java.so when run.and could run and cant compile static librarylibrary and cvnamewindow error

hi,expert i use OpenCV-2.4.8-android-sdk and android-ndk-r8-crystax-1 to build my .so lib for android project.when i compile in non-static mode,i can success.however,when i compile in static mode that is add OPENCV_LIB_TYPE:=STATIC in android.mk i find errors as follow:

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdIFStream5seekgEy+0x16): error: undefined reference to 'std::istream::seekg(std::fpos<mbstate< p="">

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdOSStream5seekpEy+0x18): error: undefined reference to 'std::ostream::seekp(std::fpos<mbstate< p="">

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdOFStream5seekpEy+0x16): error: undefined reference to 'std::ostream::seekp(std::fpos<mbstate< p="">

collect2: ld returned 1 exit status make: * [D:/OpenCV-2.4.8-android-sdk/samples/smokedetect//obj/local/armeabi/libSmokeDetect.so] Error 1

if i use non-static mode,i can get my libSmokeDetect.so successfully.but i use .so in eclipse.when i run in my hardware ,i get errors:

java.lang.ExceptionInInitializerError ... Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1936]: 85 could not load needed library 'libopencv_java.so' for 'libSmokeDetect.so' (load_library[1091]: Library 'libopencv_java.so' not found) .....

could not find libopencv_java.so

at last ,i add System.loadLibrary("opencv_java"); in my java file.and copy libopencv_java.so into libs of android project.i can pass above error,but a new error as below: OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/highgui/src/window.cpp, line 483

is there bugs in opencv2.4.8?why are there many errors when compile,link in opencv sdk? how can i resolve it?any light would be appreciated.thanks any comment.

click to hide/show revision 5
retagged

updated 2014-04-17 02:37:57 -0600

berak gravatar image

cant find libopencv_java.so when run and cant compile static library and cvnamewindow error

hi,expert i use OpenCV-2.4.8-android-sdk and android-ndk-r8-crystax-1 to build my .so lib for android project.when i compile in non-static mode,i can success.however,when i compile in static mode that is add OPENCV_LIB_TYPE:=STATIC in android.mk i find errors as follow:

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdIFStream5seekgEy+0x16): error: undefined reference to 'std::istream::seekg(std::fpos<mbstate< p="">

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdOSStream5seekpEy+0x18): error: undefined reference to 'std::ostream::seekp(std::fpos<mbstate< p="">

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdOFStream5seekpEy+0x16): error: undefined reference to 'std::ostream::seekp(std::fpos<mbstate< p="">

collect2: ld returned 1 exit status make: * [D:/OpenCV-2.4.8-android-sdk/samples/smokedetect//obj/local/armeabi/libSmokeDetect.so] Error 1

if i use non-static mode,i can get my libSmokeDetect.so successfully.but i use .so in eclipse.when i run in my hardware ,i get errors:

java.lang.ExceptionInInitializerError ... Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1936]: 85 could not load needed library 'libopencv_java.so' for 'libSmokeDetect.so' (load_library[1091]: Library 'libopencv_java.so' not found) .....

could not find libopencv_java.so

at last ,i add System.loadLibrary("opencv_java"); in my java file.and copy libopencv_java.so into libs of android project.i can pass above error,but a new error as below: OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/highgui/src/window.cpp, line 483

is there bugs in opencv2.4.8?why are there many errors when compile,link in opencv sdk? how can i resolve it?any light would be appreciated.thanks any comment.

cant find libopencv_java.so when run and cant compile static library and cvnamewindow error

hi,expert i use OpenCV-2.4.8-android-sdk and android-ndk-r8-crystax-1 to build my .so lib for android project.when i compile in non-static mode,i can success.however,when i compile in static mode that is add OPENCV_LIB_TYPE:=STATIC in android.mk i find errors as follow:

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdIFStream5seekgEy+0x16): error: undefined reference to 'std::istream::seekg(std::fpos<mbstate< p="">

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdOSStream5seekpEy+0x18): error: undefined reference to 'std::ostream::seekp(std::fpos<mbstate< p="">

D:/android-ndk-r8-crystax-1/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux /ld.exe: ../../../sdk/native/jni/../3rdparty/libs/armeabi/libIlmImf.a(ImfStdIO.cpp.o): in function Imf::St t._ZN3Imf11StdOFStream5seekpEy+0x16): error: undefined reference to 'std::ostream::seekp(std::fpos<mbstate< p="">

collect2: ld returned 1 exit status make: * [D:/OpenCV-2.4.8-android-sdk/samples/smokedetect//obj/local/armeabi/libSmokeDetect.so] Error 1

if i use non-static mode,i can get my libSmokeDetect.so successfully.but i use .so in eclipse.when i run in my hardware ,i get errors:

java.lang.ExceptionInInitializerError ... Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1936]: 85 could not load needed library 'libopencv_java.so' for 'libSmokeDetect.so' (load_library[1091]: Library 'libopencv_java.so' not found) .....

could not find libopencv_java.so

at last ,i add System.loadLibrary("opencv_java"); in my java file.and copy libopencv_java.so into libs of android project.i can pass above error,but a new error as below: OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/highgui/src/window.cpp, line 483

is there bugs in opencv2.4.8?why are there many errors when compile,link in opencv sdk? i work in windows and use opencv2.4.8 android sdk released from opencv.org.why need recompile.how to recompile in windows.i don't know why offical release is unavailable? how can i resolve it?any light would be appreciated.thanks any comment.