3rd party libs linker error

2,036 views
Skip to first unread message

holzi

unread,
Feb 7, 2012, 4:17:28 AM2/7/12
to android-opencv
Hi,

I'm having a linker error on opencv 3rd party libs when I try to use
it in an Eclipse project. Even on some I am not using. I did build
opencv with NEON support and included the correct OpenCV.mk in my
Android.mk file.

First, I used the precompiled opencv version and everything worked
fine until I tried to enable NEON support. So I thought I have to
compile OpenCV with NEON to get it working.

However, now I'm getting the following linker errors on opencv trunk
(enabled or disabled NEON), with the precompiled package I just get
some (core) linker errors when I try to enable NEON.

Does someone have an advice for me?
Thanks!

./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg.cpp.o): In
function `cv::jpeg_buffer_src(jpeg_decompress_struct*,
cv::JpegSource*)':
grfmt_jpeg.cpp:
(.text._ZN2cv15jpeg_buffer_srcEP22jpeg_decompress_structPNS_10JpegSourceE
+0x34): undefined reference to `jpeg_resync_to_restart'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg.cpp.o): In
function `cv::JpegEncoder::write(cv::Mat const&, std::vector<int,
std::allocator<int> > const&)':
grfmt_jpeg.cpp:
(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0xd8):
undefined reference to `jpeg_CreateCompress'
grfmt_jpeg.cpp:
(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0xe2):
undefined reference to `jpeg_std_error'
grfmt_jpeg.cpp:
(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x16a):
undefined reference to `jpeg_destroy_compress'
grfmt_jpeg.cpp:
(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x1c8):
undefined reference to `jpeg_set_defaults'
grfmt_jpeg.cpp:
(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x1d6):
undefined reference to `jpeg_set_quality'
grfmt_jpeg.cpp:
(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x1e2):
undefined reference to `jpeg_start_compress'
grfmt_jpeg.cpp:
(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x242):
undefined reference to `jpeg_write_scanlines'
grfmt_jpeg.cpp:
(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x254):
undefined reference to `jpeg_finish_compress'
grfmt_jpeg.cpp:
(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x2b8):
undefined reference to `jpeg_stdio_dest'
grfmt_jpeg.cpp:
(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x330):
undefined reference to `jpeg_write_scanlines'
grfmt_jpeg.cpp:
(.text._ZN2cv11JpegEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x3b0):
undefined reference to `jpeg_write_scanlines'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg.cpp.o): In
function `cv::JpegDecoder::close()':
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder5closeEv+0xa): undefined
reference to `jpeg_destroy_decompress'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg.cpp.o): In
function `cv::JpegDecoder::readData(cv::Mat&)':
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder8readDataERNS_3MatE+0x7e):
undefined reference to `jpeg_start_decompress'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder8readDataERNS_3MatE+0xf6):
undefined reference to `jpeg_read_scanlines'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder8readDataERNS_3MatE+0x114):
undefined reference to `jpeg_finish_decompress'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder8readDataERNS_3MatE+0x186):
undefined reference to `jpeg_read_scanlines'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder8readDataERNS_3MatE+0x2b4):
undefined reference to `jpeg_alloc_huff_table'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg.cpp.o): In
function `cv::JpegDecoder::readHeader()':
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder10readHeaderEv+0x1c):
undefined reference to `jpeg_std_error'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder10readHeaderEv+0x4e):
undefined reference to `jpeg_CreateDecompress'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder10readHeaderEv+0x8a):
undefined reference to `jpeg_stdio_src'
grfmt_jpeg.cpp:(.text._ZN2cv11JpegDecoder10readHeaderEv+0x92):
undefined reference to `jpeg_read_header'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg2000.cpp.o): In
function `global constructors keyed to grfmt_jpeg2000.cpp':
grfmt_jpeg2000.cpp:(.text._GLOBAL__I_grfmt_jpeg2000.cpp+0x2):
undefined reference to `jas_init'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg2000.cpp.o): In
function `cv::JasperInitializer::~JasperInitializer()':
grfmt_jpeg2000.cpp:
(.text._ZN2cv17JasperInitializerD1Ev[cv::JasperInitializer::~JasperInitializer()]
+0x4): undefined reference to `jas_cleanup'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg2000.cpp.o): In
function `cv::Jpeg2KEncoder::writeComponent16u(void*, cv::Mat
const&)':
grfmt_jpeg2000.cpp:
(.text._ZN2cv13Jpeg2KEncoder17writeComponent16uEPvRKNS_3MatE+0x16):
undefined reference to `jas_matrix_create'
grfmt_jpeg2000.cpp:
(.text._ZN2cv13Jpeg2KEncoder17writeComponent16uEPvRKNS_3MatE+0x88):
undefined reference to `jas_image_writecmpt'
grfmt_jpeg2000.cpp:
(.text._ZN2cv13Jpeg2KEncoder17writeComponent16uEPvRKNS_3MatE+0x9c):
undefined reference to `jas_matrix_destroy'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg2000.cpp.o): In
function `cv::Jpeg2KEncoder::writeComponent8u(void*, cv::Mat const&)':
grfmt_jpeg2000.cpp:
(.text._ZN2cv13Jpeg2KEncoder16writeComponent8uEPvRKNS_3MatE+0x16):
undefined reference to `jas_matrix_create'
grfmt_jpeg2000.cpp:
(.text._ZN2cv13Jpeg2KEncoder16writeComponent8uEPvRKNS_3MatE+0x88):
undefined reference to `jas_image_writecmpt'
grfmt_jpeg2000.cpp:
(.text._ZN2cv13Jpeg2KEncoder16writeComponent8uEPvRKNS_3MatE+0x9c):
undefined reference to `jas_matrix_destroy'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg2000.cpp.o): In
function `cv::Jpeg2KEncoder::write(cv::Mat const&, std::vector<int,
std::allocator<int> > const&)':
grfmt_jpeg2000.cpp:
(.text._ZN2cv13Jpeg2KEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE
+0x6a): undefined reference to `jas_image_create'
grfmt_jpeg2000.cpp:
(.text._ZN2cv13Jpeg2KEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE
+0x9e): undefined reference to `jas_image_destroy'
grfmt_jpeg2000.cpp:
(.text._ZN2cv13Jpeg2KEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE
+0xd2): undefined reference to `jas_stream_fopen'
grfmt_jpeg2000.cpp:
(.text._ZN2cv13Jpeg2KEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE
+0xe0): undefined reference to `jas_image_strtofmt'
grfmt_jpeg2000.cpp:
(.text._ZN2cv13Jpeg2KEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE
+0xee): undefined reference to `jas_image_encode'
grfmt_jpeg2000.cpp:
(.text._ZN2cv13Jpeg2KEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE
+0xfc): undefined reference to `jas_stream_close'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg2000.cpp.o): In
function `cv::Jpeg2KDecoder::close()':
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder5closeEv+0x8):
undefined reference to `jas_stream_close'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder5closeEv+0x14):
undefined reference to `jas_image_destroy'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg2000.cpp.o): In
function `cv::Jpeg2KDecoder::readData(cv::Mat&)':
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder8readDataERNS_3MatE
+0x58): undefined reference to `jas_image_getcmptbytype'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder8readDataERNS_3MatE
+0x62): undefined reference to `jas_image_getcmptbytype'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder8readDataERNS_3MatE
+0x6c): undefined reference to `jas_image_getcmptbytype'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder8readDataERNS_3MatE
+0x8c): undefined reference to `jas_image_getcmptbytype'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder8readDataERNS_3MatE
+0xba): undefined reference to `jas_cmprof_createfromclrspc'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder8readDataERNS_3MatE
+0xcc): undefined reference to `jas_image_chclrspc'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder8readDataERNS_3MatE
+0xdc): undefined reference to `jas_image_destroy'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder8readDataERNS_3MatE
+0xe6): undefined reference to `jas_cmprof_destroy'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder8readDataERNS_3MatE
+0x14e): undefined reference to `jas_matrix_create'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder8readDataERNS_3MatE
+0x16a): undefined reference to `jas_image_readcmpt'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder8readDataERNS_3MatE
+0x19e): undefined reference to `jas_matrix_destroy'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder8readDataERNS_3MatE
+0x226): undefined reference to `jas_cmprof_destroy'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_jpeg2000.cpp.o): In
function `cv::Jpeg2KDecoder::readHeader()':
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder10readHeaderEv+0x10):
undefined reference to `jas_stream_fopen'
grfmt_jpeg2000.cpp:(.text._ZN2cv13Jpeg2KDecoder10readHeaderEv+0x20):
undefined reference to `jas_image_decode'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_png.cpp.o): In
function `cv::PngEncoder::writeDataToBuf(void*, unsigned char*,
unsigned int)':
grfmt_png.cpp:(.text._ZN2cv10PngEncoder14writeDataToBufEPvPhj+0x12):
undefined reference to `png_get_io_ptr'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_png.cpp.o): In
function `cv::PngDecoder::readDataFromBuf(void*, unsigned char*,
unsigned int)':
grfmt_png.cpp:(.text._ZN2cv10PngDecoder15readDataFromBufEPvPhj+0xc):
undefined reference to `png_get_io_ptr'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder15readDataFromBufEPvPhj+0xcc):
undefined reference to `png_error'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_png.cpp.o): In
function `cv::PngDecoder::close()':
grfmt_png.cpp:(.text._ZN2cv10PngDecoder5closeEv+0x26): undefined
reference to `png_destroy_read_struct'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_png.cpp.o): In
function `cv::PngDecoder::readHeader()':
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x14): undefined
reference to `png_create_read_struct'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x1c): undefined
reference to `png_create_info_struct'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x24): undefined
reference to `png_create_info_struct'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x64): undefined
reference to `png_set_longjmp_fn'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x96): undefined
reference to `png_init_io'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0xa8): undefined
reference to `png_read_info'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0xc4): undefined
reference to `png_get_IHDR'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder10readHeaderEv+0x110):
undefined reference to `png_set_read_fn'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_png.cpp.o): In
function `cv::PngEncoder::write(cv::Mat const&, std::vector<int,
std::allocator<int> > const&)':
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x6c):
undefined reference to `png_create_write_struct'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0xc0):
undefined reference to `png_create_info_struct'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0xe4):
undefined reference to `png_set_longjmp_fn'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x112):
undefined reference to `png_set_write_fn'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x140):
undefined reference to `png_set_compression_mem_level'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x14e):
undefined reference to `png_set_compression_strategy'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x18e):
undefined reference to `png_set_IHDR'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x1a2):
undefined reference to `png_write_info'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x1ae):
undefined reference to `png_set_bgr'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x1c4):
undefined reference to `png_set_swap'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x230):
undefined reference to `png_write_image'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x244):
undefined reference to `png_write_end'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x25c):
undefined reference to `png_destroy_write_struct'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x2be):
undefined reference to `png_init_io'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x2d2):
undefined reference to `png_set_filter'
grfmt_png.cpp:
(.text._ZN2cv10PngEncoder5writeERKNS_3MatERKSt6vectorIiSaIiEE+0x2e0):
undefined reference to `png_set_compression_level'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_png.cpp.o): In
function `cv::PngDecoder::readData(cv::Mat&)':
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x9e):
undefined reference to `png_set_longjmp_fn'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x10a):
undefined reference to `png_set_gray_to_rgb'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x112):
undefined reference to `png_read_update_info'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x136):
undefined reference to `png_read_image'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x13e):
undefined reference to `png_read_end'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x148):
undefined reference to `png_set_palette_to_rgb'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x166):
undefined reference to `png_set_rgb_to_gray'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x16e):
undefined reference to `png_set_bgr'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x176):
undefined reference to `png_set_strip_alpha'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x17e):
undefined reference to `png_set_swap'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x18a):
undefined reference to `png_set_expand_gray_1_2_4_to_8'
grfmt_png.cpp:(.text._ZN2cv10PngDecoder8readDataERNS_3MatE+0x192):
undefined reference to `png_set_strip_16'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_tiff.cpp.o): In
function `cv::TiffDecoder::close()':
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder5closeEv+0x8): undefined
reference to `TIFFClose'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_tiff.cpp.o): In
function `cv::TiffDecoder::readHeader()':
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder10readHeaderEv+0x10):
undefined reference to `TIFFOpen'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder10readHeaderEv+0x28):
undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder10readHeaderEv+0x42):
undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder10readHeaderEv+0x52):
undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder10readHeaderEv+0x72):
undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder10readHeaderEv+0x7e):
undefined reference to `TIFFGetField'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_tiff.cpp.o): In
function `cv::TiffDecoder::readData(cv::Mat&)':
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x78):
undefined reference to `TIFFIsTiled'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x8a):
undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0xbc):
undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0xcc):
undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x104):
undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x116):
undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x21e):
undefined reference to `TIFFReadEncodedStrip'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x2e2):
undefined reference to `TIFFReadEncodedStrip'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x450):
undefined reference to `TIFFReadRGBAStrip'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x4d4):
undefined reference to `TIFFGetField'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x4ea):
undefined reference to `TIFFReadEncodedTile'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x4fa):
undefined reference to `TIFFReadEncodedTile'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x508):
undefined reference to `TIFFReadRGBATile'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoder8readDataERNS_3MatE+0x56e):
undefined reference to `TIFFRGBAImageOK'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_tiff.cpp.o): In
function `cv::TiffEncoder::writeLibTiff(cv::Mat const&,
std::vector<int, std::allocator<int> > const&)':
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0x6e): undefined reference to `TIFFOpen'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0x88): undefined reference to `TIFFSetField'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0x92): undefined reference to `TIFFClose'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0xa0): undefined reference to `TIFFSetField'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0xb0): undefined reference to `TIFFSetField'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0xc0): undefined reference to `TIFFSetField'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0xd0): undefined reference to `TIFFSetField'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0xe0): undefined reference to `TIFFSetField'
./obj/local/armeabi-v7a/
libopencv_highgui.a(grfmt_tiff.cpp.o):grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0xf0): more undefined references to `TIFFSetField' follow
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_tiff.cpp.o): In
function `cv::TiffEncoder::writeLibTiff(cv::Mat const&,
std::vector<int, std::allocator<int> > const&)':
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0x120): undefined reference to `TIFFScanlineSize'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0x17a): undefined reference to `TIFFClose'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0x1c8): undefined reference to `TIFFWriteScanline'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0x1da): undefined reference to `TIFFClose'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0x20a): undefined reference to `TIFFWriteScanline'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0x24c): undefined reference to `TIFFWriteScanline'
grfmt_tiff.cpp:
(.text._ZN2cv11TiffEncoder12writeLibTiffERKNS_3MatERKSt6vectorIiSaIiEE
+0x2d2): undefined reference to `TIFFWriteScanline'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_tiff.cpp.o): In
function `cv::TiffDecoder::TiffDecoder()':
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoderC1Ev+0x2c): undefined
reference to `TIFFSetErrorHandler'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoderC1Ev+0x34): undefined
reference to `TIFFSetWarningHandler'
./obj/local/armeabi-v7a/libopencv_highgui.a(grfmt_tiff.cpp.o): In
function `cv::TiffDecoder::TiffDecoder()':
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoderC2Ev+0x2c): undefined
reference to `TIFFSetErrorHandler'
grfmt_tiff.cpp:(.text._ZN2cv11TiffDecoderC2Ev+0x34): undefined
reference to `TIFFSetWarningHandler'
./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): In
function `icvPuts(CvFileStorage*, char const*)':
persistence.cpp:(.text._ZL7icvPutsP13CvFileStoragePKc+0x20): undefined
reference to `gzputs'
./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): In
function `icvGets(CvFileStorage*, char*, int)':
persistence.cpp:(.text._ZL7icvGetsP13CvFileStoragePci+0x26): undefined
reference to `gzgets'
./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): In
function `icvXMLSkipSpaces(CvFileStorage*, char*, int)':
persistence.cpp:(.text._ZL16icvXMLSkipSpacesP13CvFileStoragePci
+0x1de): undefined reference to `gzgets'
persistence.cpp:(.text._ZL16icvXMLSkipSpacesP13CvFileStoragePci
+0x204): undefined reference to `gzeof'
persistence.cpp:(.text._ZL16icvXMLSkipSpacesP13CvFileStoragePci
+0x33a): undefined reference to `gzeof'
./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): In
function `_ZL16icvYMLSkipSpacesP13CvFileStoragePcii.clone.3':
persistence.cpp:(.text._ZL16icvYMLSkipSpacesP13CvFileStoragePcii.clone.
3+0x12e): undefined reference to `gzgets'
persistence.cpp:(.text._ZL16icvYMLSkipSpacesP13CvFileStoragePcii.clone.
3+0x17e): undefined reference to `gzeof'
persistence.cpp:(.text._ZL16icvYMLSkipSpacesP13CvFileStoragePcii.clone.
3+0x294): undefined reference to `gzeof'
./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): In
function `cvReleaseFileStorage':
persistence.cpp:(.text.cvReleaseFileStorage+0x24): undefined reference
to `gzclose'
./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): In
function `cvOpenFileStorage':
persistence.cpp:(.text.cvOpenFileStorage+0x67c): undefined reference
to `gzopen'
persistence.cpp:(.text.cvOpenFileStorage+0x8ee): undefined reference
to `gzclose'
persistence.cpp:(.text.cvOpenFileStorage+0xaea): undefined reference
to `gzrewind'
persistence.cpp:(.text.cvOpenFileStorage+0xbf6): undefined reference
to `gzrewind'
persistence.cpp:(.text.cvOpenFileStorage+0xd5c): undefined reference
to `gzclose'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi-v7a/libstereo_matching.so] Fehler 1

dschaudel

unread,
Feb 17, 2012, 9:14:09 AM2/17/12
to android...@googlegroups.com
same issue here

Andrey Pavlenko

unread,
Feb 17, 2012, 10:11:58 AM2/17/12
to android...@googlegroups.com
Try the latest trunk with the NDK v7, we build it nightly and it's OK...

dschaudel

unread,
Feb 19, 2012, 5:18:42 AM2/19/12
to android-opencv
tried it with NDK v7 and trunk r7332

1) first try:

#include <jni.h>

#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"

using namespace cv;
using namespace std;

extern "C"{
JNIEXPORT void JNICALL
Java_de_dschaudel_cv_TrafficSignDetectionAndRecognitionActivity_setimage
(JNIEnv *env, jobject obj) {
cv::Mat image1;
cv::Mat image2;

}
}

NO ERROR

2) second try!

#include <jni.h>

#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"

using namespace cv;
using namespace std;

extern "C"{
JNIEXPORT void JNICALL
Java_de_dschaudel_cv_TrafficSignDetectionAndRecognitionActivity_setimage
(JNIEnv *env, jobject obj) {
cv::Mat image1;
cv::Mat image2;
cv::Mat image3;
}
}

ERROR!

SharedLibrary : libimagefea.so
make: *** [obj/local/armeabi-v7a/libimagefea.so] Error 1

3) console out of sh cmake_android.sh

-- Detected version of GNU GCC: 44 (404)
-- Extracting svn version, please wait...
-- SVNVERSION: svn:7332
-- Use NumPy headers from: /usr/lib/pymodules/python2.7/numpy/core/
include
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named sphinx
-- Found android tool: /home/dschaudel/android-sdks/tools/android
-- Found apache ant 1.8.2: /usr/bin/ant
--
-- General configuration for opencv 2.3.3
=====================================
--
-- Built as dynamic libs?: NO
-- C++ Compiler: /home/dschaudel/android-toolchain/
bin/arm-linux-androideabi-g++
-- C++ flags (Release): --sysroot="/home/dschaudel/android-
toolchain/sysroot" -fsigned-char -march=armv7-a -mfloat-abi=softfp -
mfpu=vfp -fPIC -Wno-psabi -frtti -fexceptions -Wall -ffunction-
sections -mthumb -O3 -fomit-frame-pointer -DNDEBUG -fomit-frame-
pointer -DNDEBUG
-- C++ flags (Debug): --sysroot="/home/dschaudel/android-
toolchain/sysroot" -fsigned-char -march=armv7-a -mfloat-abi=softfp -
mfpu=vfp -fPIC -Wno-psabi -frtti -fexceptions -Wall -ffunction-
sections -marm -Os -finline-limit=64 -fno-strict-aliasing -fno-omit-
frame-pointer -DDEBUG -D_DEBUG -O0 -DDEBUG -D_DEBUG -ggdb3
-- Linker flags (Release): -Wl,--fix-cortex-a8 -Wl,--no-
undefined -lstdc++
-- Linker flags (Debug): -Wl,--fix-cortex-a8 -Wl,--no-
undefined -lstdc++
--
-- OpenCV modules:
-- To be built: androidcamera calib3d contrib core
features2d flann highgui imgproc java legacy ml objdetect stitching ts
video
-- Disabled by user: -
-- Disabled by dependency: -
-- Unavailable: gpu python
--
-- Android:
-- Android ABI: armeabi-v7a
-- Native API level: android-8
-- SDK target: android-8
-- Android toolchain: /home/dschaudel/android-toolchain
-- android tool: /home/dschaudel/android-sdks/tools/
android (Android SDK Tools, revision 16.)
-- ant: /usr/bin/ant (ver 1.8.2)
--
-- GUI:
-- GTK+ 2.x: NO
-- GThread : NO
-- GtkGlExt: NO
-- OpenGL support: NO
--
-- Media I/O:
-- ZLib: build
-- JPEG: build
-- PNG: build
-- TIFF: build
-- JPEG 2000: build
-- OpenEXR: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
--
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: NO
-- FFMPEG: NO
-- codec: NO
-- format: NO
-- util: NO
-- swscale: NO
-- gentoo-style: NO
-- GStreamer: NO
-- UniCap: NO
-- PvAPI: NO
-- V4L/V4L2: FALSE/FALSE
-- Xine: NO
-- AndroidNativeCamera: YES, use prebuilt libraries
--
-- Other third-party libraries:
-- Use IPP: NO
-- Use TBB: NO
-- Use Cuda: NO
-- Use Eigen: NO
--
-- Python interpreter: /usr/bin/python2.7 (ver 2.7)
--
-- Interfaces:
-- Python: NO
-- Python numpy: YES
-- Java: YES
--
-- Documentation:
-- Sphinx: NO
-- PdfLaTeX compiler: /usr/bin/pdflatex
-- Build Documentation: NO
--
-- Tests and samples:
-- Tests: YES
-- Performance tests: YES
-- Examples: NO
-- Android tests: YES
-- Android examples: YES
--
-- Install path: /home/dschaudel/android-toolchain/
user
--
-- cvconfig.h is in: /home/dschaudel/opencv/android/
build
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dschaudel/opencv/android/
build


On Feb 17, 4:11 pm, Andrey Pavlenko <andrey.pavle...@itseez.com>
wrote:

Cédric

unread,
Feb 27, 2012, 9:24:30 AM2/27/12
to android-opencv
same here.
I tried with ndk r7b and svn trunk 7398.

Vlad

unread,
Aug 26, 2012, 11:06:59 AM8/26/12
to android...@googlegroups.com
any update on this topic? i'm having the same issue and stuck for over a week now

Andrey Pavlenko

unread,
Sep 4, 2012, 3:34:24 AM9/4/12
to android...@googlegroups.com
use NDK r8, add the "APP_PLATFORM := android-9" line to your  Application.mk 
Reply all
Reply to author
Forward
0 new messages