Developing Frogtek

El blog del Departamento de Tecnología

Aprendiendo a usar el NDK (Parte I)

En Frogtek, últimamente, hemos estado usando la NDK para poder dar a nuestro querido tiendatek una funcionalidad muy especial.
Queremos compartir con vosotros toda nuestra aventura y para eso vamos a comenzar desde lo más básico (NDK Hello World), terminando con algo realmente mágico (que no majico) y anfibio.

La ndk es un conjunto de herramientas que nos permite construir librerías compartidas para poder llamar desde Java a código nativo.
Las instrucciones nativas se ejecutan sin pasar por la máquina virtual. Por eso, una de las razones por las cuales se escribe código en la ndk es el rendimiento.
En nuestro caso la elección de la ndk viene dada por la necesidad de cargar librerías que no podemos utilizar directamente en Java. Realmente podemos programar una aplicación 100% nativa. Es decir: incluyendo actividades codificadas completamente en C.

Para realizar esta tarea, la gente de Google usa JNI (Java Native Interface)JNI es una interfaz que nos permite hacer llamadas a código escrito en C desde Java mediante un sencillo sistema de nombrado de los métodos.
Eso sí: debemos tener cuidado con la gestión de memoria que hace JNI; pero de ello hablaremos en próximos posts.

Vayamos al grano. Debemos descargar el conjunto de herramientas que provee Android desde aquí. Después, debemos seguir estas instrucciones:

Creamos un proyecto Android normal, creando un layout básico con un botón (el que hará la llamada al código nativo). 

En la carpeta raíz del proyecto creamos una carpeta llamada jni, que incluirá dos ficheros llamados Android.mk (el makefile, con la A en mayúscula). Este fichero contiene las instrucciones para construir el código nativo.

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE:= ndksample
LOCAL_SRC_FILES:= ndksample.c

include $(BUILD_SHARED_LIBRARY)

Seguidamente, crear otro fichero que nosotros hemos llamado ndksample.c (fichero que contendrá las funciones nativas). 

#include 
#include 

jstring Java_org_frogtek_ndksample_Main_getStringFromNDK(JNIEnv* env, jobject this)
{
	return (*env)->NewStringUTF(env, "Croak!!");
}

Ahora hay que compilar dicho fichero c para construir la librería que será cargada desde Java. Para ellos se utiliza la herramienta nkd-build que está en la carpeta de la ndk que anteriormente descargamos, ejecutando este comando:

./ndk-buil -C /ruta/a/nuestro/proyecto

Ha de ser la ruta raíz del proyecto. Este comando terminará con una linea similar a

libndksample.so => libs/armeabi/libndksample.so

Esto quiere decir que todo ha ido bien y que nos ha generado la librería, copiándola al sitio correcto dentro de nuestro proyecto. Si hacemos un refresh en Eclipse observaremos la presencia de dicho fichero.

Una vez que tenemos la librería compilada y generada, podemos llamarla desde Java. Para este cometido, lo primero que tenemos que hacer es cargar dicha librería usando el siguiente método de la clase System:

static {
        System.loadLibrary("ndksample");
}

Esta llamada hay que hacerla de manera estática, dentro de la clase que hará uso de la función o funciones de C. Nótese que el nombre que ponemos ha de ser el que hemos puesto en LOCAL_MODULE en el Android.mk

También tenemos que definir el método nativo para poder llamarlo desde Java. Lo haremos de la siguiente manera:

 public native String getStringFromNDK();

Tenemos que notar que dicho método ha de corresponder con la firma del que definimos en el código c, y no solo eso, también ha de coincidir el paquete y la clase que contienen esta llamada con la que hemos escrito en la firma del método de c.

Ahora solo nos queda llamarlo para poder ver que todo funciona:

 Toast.makeText(Main.this, getStringFromNDK(), Toast.LENGTH_LONG).show();

Esto ha sido todo para nuestro primer post de una serie en la que hablaremos sobre la NDK. Y recordad, pequeños developers: lo nativo mola. Podéis descargar el proyecto desde aquí.

6 Comentarios

  1. Interesante. Espero los próximos artículos sobre el NDK 🙂

    Btw, repasad el código del artículo, que parece que algún filtro se ha comido trozos…

    #include 
  2. Muchas gracias por este ejemplo estaba batallando mucho para poder correr el hello-jni de los ejemplos, una pregunta cuando antes tenia en el hello-jni en el nombre ….._stringFromNDK (marcaba error) y lo cambie de manera a tenerlo igual al tuyo …._getStringFromNDK en donde puedo ver las cabeceras por asi decirlo para saber que poner si quiero que mi aplicación realice otras actividades, o algún libro o manual que me recomiendes para seguir aprendiendo.

    Saludos

  3. no entendi la parte de la ejecucion de los comandos… no mencionas en que terminal … es en cygwin?

  4. Como puedo compilar eso en windows si el comando para compilar los archivos de la carpeta jni es de linux

  5. Buenas tardes,
    Estoy desarrollando un nuevo módulo para una aplicación Android, que ya tiene código JNI.

    He creado una clase virtual.cpp dentro de la carpeta jni, he creado los ficheros cabecera y he cargado la librería en la clase java correspondiente, VirtualActivity.java:

    static {
    try{
    System.loadLibrary("virtual");
    Log.d(LOGTAG, "Library loaded");
    }catch (Exception e){
    Log.d(LOGTAG, "Did not load library");
    }
    }

    El comienzo del fichero virtual.cpp es el siguiente:

    #include

    #include
    #include
    #include
    #include
    #include
    #include

    #include
    #include "org_videolan_vlc_gui_video_VirtualActivity_DepthTestSurfaceView.h"
    #include "org_videolan_vlc_gui_video_VirtualActivity.h"

    #define LOG_TAG "Imagen 3D - Proyecto Virtual"
    #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
    #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)

    using namespace cv;

    extern "C"
    JNIEXPORT jboolean JNICALL
    Java_org_videolan_vlc_gui_video_VirtualActivity_VirtualJNI(JNIEnv* env, jobject thiz, jint width, jint height, jintArray image_color, jintArray image_depth, jintArray image_out){

    ...
    }

    Y los ficheros de cabecera son los siguientes:

    org_videolan_vlc_gui_video_VirtualActivity_DepthTestSurfaceView.h


    #include
    /* Header for class org_videolan_vlc_gui_video_VirtualActivity_DepthTestSurfaceView */

    #ifndef _Included_org_videolan_vlc_gui_video_VirtualActivity_DepthTestSurfaceView
    #define _Included_org_videolan_vlc_gui_video_VirtualActivity_DepthTestSurfaceView
    #ifdef __cplusplus
    extern "C" {
    #endif
    #ifdef __cplusplus
    }
    #endif
    #endif

    org_videolan_vlc_gui_video_VirtualActivity.h

    #include
    /* Header for class org_videolan_vlc_gui_video_VirtualActivity */

    #ifndef _Included_org_videolan_vlc_gui_video_VirtualActivity
    #define _Included_org_videolan_vlc_gui_video_VirtualActivity
    #ifdef __cplusplus
    extern "C" {
    #endif
    /*
    * Class: org_videolan_vlc_gui_video_VirtualActivity
    * Method: VirtualJNI
    * Signature: (II[I[I[I)Z
    */
    JNIEXPORT jboolean JNICALL Java_org_videolan_vlc_gui_video_VirtualActivity_VirtualJNI
    (JNIEnv *, jobject, jint, jint, jintArray, jintArray, jintArray);

    #ifdef __cplusplus
    }
    #endif
    #endif

    Y por último, he modificado el fichero Android.mk incluyendo al final lo siguiente:
    include $(CLEAR_VARS)

    OPENCV_LIB_TYPE:=STATIC
    OPENCV_INSTALL_MODULES:=on

    include /home/vmg/workspace/android/OpenCV-2.4.5-android-sdk/sdk/native/jni/OpenCV.mk
    include $(OPENCV_MK_PATH)

    LOCAL_MODULE := virtual
    LOCAL_SRC_FILES := virtual.cpp

    include $(BUILD_SHARED_LIBRARY)

    Cuando compilo el proyecto me salen muchos errores:

    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(matrix.cpp.o): in function cv::Mat* std::__uninitialized_copy::__uninit_copy(cv::Mat*, cv::Mat*, cv::Mat*):matrix.cpp(.text._ZNSt20__uninitialized_copyILb0EE13__uninit_copyIPN2cv3MatES4_EET0_T_S6_S5_+0x24): error: undefined reference to '__cxa_begin_catch'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(matrix.cpp.o): in function cv::Mat* std::__uninitialized_copy::__uninit_copy(cv::Mat*, cv::Mat*, cv::Mat*):matrix.cpp(.text._ZNSt20__uninitialized_copyILb0EE13__uninit_copyIPN2cv3MatES4_EET0_T_S6_S5_+0x38): error: undefined reference to '__cxa_rethrow'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(matrix.cpp.o): in function cv::Mat* std::__uninitialized_copy::__uninit_copy(cv::Mat*, cv::Mat*, cv::Mat*):matrix.cpp(.text._ZNSt20__uninitialized_copyILb0EE13__uninit_copyIPN2cv3MatES4_EET0_T_S6_S5_+0x3c): error: undefined reference to '__cxa_end_catch'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(matrix.cpp.o): in function std::vector<cv::Mat, std::allocator >::_M_fill_insert(__gnu_cxx::__normal_iterator<cv::Mat*, std::vector<cv::Mat, std::allocator > >, unsigned int, cv::Mat const&):matrix.cpp(.text._ZNSt6vectorIN2cv3MatESaIS1_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS1_S3_EEjRKS1_+0x1d0): error: undefined reference to '__cxa_begin_catch'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(matrix.cpp.o): in function std::vector<cv::Mat, std::allocator >::_M_fill_insert(__gnu_cxx::__normal_iterator<cv::Mat*, std::vector<cv::Mat, std::allocator > >, unsigned int, cv::Mat const&):matrix.cpp(.text._ZNSt6vectorIN2cv3MatESaIS1_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS1_S3_EEjRKS1_+0x1f8): error: undefined reference to '__cxa_end_catch'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(matrix.cpp.o): in function std::vector<cv::Mat, std::allocator >::_M_fill_insert(__gnu_cxx::__normal_iterator<cv::Mat*, std::vector<cv::Mat, std::allocator > >, unsigned int, cv::Mat const&):matrix.cpp(.text._ZNSt6vectorIN2cv3MatESaIS1_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS1_S3_EEjRKS1_+0x208): error: undefined reference to '__cxa_rethrow'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): in function cv::toUtf16(std::basic_string<char, std::char_traits, std::allocator > const&):persistence.cpp(.text._ZN2cv7toUtf16ERKSs+0x4a): error: undefined reference to 'std::basic_string<wchar_t, std::char_traits, std::allocator >::basic_string(wchar_t const*, std::allocator const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): in function cv::toUtf16(std::basic_string<char, std::char_traits, std::allocator > const&):persistence.cpp(.text._ZN2cv7toUtf16ERKSs+0x84): error: undefined reference to 'std::basic_string<wchar_t, std::char_traits, std::allocator >::_Rep::_S_empty_rep_storage'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): in function cv::operator<<(cv::FileStorage&, std::basic_string<char, std::char_traits, std::allocator > const&):persistence.cpp(.text._ZN2cvlsERNS_11FileStorageERKSs+0xfe): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::assign(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): in function cv::operator<<(cv::FileStorage&, std::basic_string<char, std::char_traits, std::allocator > const&):persistence.cpp(.text._ZN2cvlsERNS_11FileStorageERKSs+0x25e): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::assign(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): in function icvClose(CvFileStorage*, std::basic_string<char, std::char_traits, std::allocator >*):persistence.cpp(.text._ZL8icvCloseP13CvFileStoragePSs+0x18): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::_M_mutate(unsigned int, unsigned int, unsigned int)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): in function icvClose(CvFileStorage*, std::basic_string<char, std::char_traits, std::allocator >*):persistence.cpp(.text._ZL8icvCloseP13CvFileStoragePSs+0xcc): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::resize(unsigned int, char)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): in function icvClose(CvFileStorage*, std::basic_string<char, std::char_traits, std::allocator >*):persistence.cpp(.text._ZL8icvCloseP13CvFileStoragePSs+0xf2): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::_M_leak_hard()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(persistence.cpp.o): in function cv::FileStorage::releaseAndGetString():persistence.cpp(.text._ZN2cv11FileStorage19releaseAndGetStringEv+0x12): error: undefined reference to 'std::basic_string<char, std::char_traits, std::allocator >::reserve(unsigned int)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function cv::gpu::error(char const*, char const*, int, char const*):gpumat.cpp(.text._ZN2cv3gpu5errorEPKcS2_iS2_+0xe): error: undefined reference to 'std::uncaught_exception()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function cv::gpu::error(char const*, char const*, int, char const*):gpumat.cpp(.text._ZN2cv3gpu5errorEPKcS2_iS2_+0x36): error: undefined reference to 'std::basic_ostream<char, std::char_traits >& std::__ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*, int)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function cv::gpu::error(char const*, char const*, int, char const*):gpumat.cpp(.text._ZN2cv3gpu5errorEPKcS2_iS2_+0x4e): error: undefined reference to 'std::basic_ostream<char, std::char_traits >& std::__ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*, int)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function cv::gpu::error(char const*, char const*, int, char const*):gpumat.cpp(.text._ZN2cv3gpu5errorEPKcS2_iS2_+0x5a): error: undefined reference to 'std::basic_ostream<char, std::char_traits >& std::__ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*, int)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function cv::gpu::error(char const*, char const*, int, char const*):gpumat.cpp(.text._ZN2cv3gpu5errorEPKcS2_iS2_+0x70): error: undefined reference to 'std::basic_ostream<char, std::char_traits >& std::__ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*, int)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function cv::gpu::error(char const*, char const*, int, char const*):gpumat.cpp(.text._ZN2cv3gpu5errorEPKcS2_iS2_+0xc0): error: undefined reference to 'std::basic_ostream<char, std::char_traits >::operator<<(int)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function cv::gpu::error(char const*, char const*, int, char const*):gpumat.cpp(.text._ZN2cv3gpu5errorEPKcS2_iS2_+0xc6): error: undefined reference to 'std::basic_ostream<char, std::char_traits >::flush()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function cv::gpu::error(char const*, char const*, int, char const*):gpumat.cpp(.text._ZN2cv3gpu5errorEPKcS2_iS2_+0x170): error: undefined reference to 'std::basic_ios<char, std::char_traits >::clear(std::_Ios_Iostate)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function cv::gpu::error(char const*, char const*, int, char const*):gpumat.cpp(.text._ZN2cv3gpu5errorEPKcS2_iS2_+0x18c): error: undefined reference to 'std::basic_ios<char, std::char_traits >::clear(std::_Ios_Iostate)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function cv::gpu::error(char const*, char const*, int, char const*):gpumat.cpp(.text._ZN2cv3gpu5errorEPKcS2_iS2_+0x1a0): error: undefined reference to 'std::basic_ios<char, std::char_traits >::clear(std::_Ios_Iostate)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function cv::gpu::error(char const*, char const*, int, char const*):gpumat.cpp(.text._ZN2cv3gpu5errorEPKcS2_iS2_+0x228): error: undefined reference to 'std::cerr'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function _GLOBAL__sub_I_gpumat.cpp:gpumat.cpp(.text.startup._GLOBAL__sub_I_gpumat.cpp+0x16): error: undefined reference to 'std::ios_base::Init::Init()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libopencv_core.a(gpumat.cpp.o): in function _GLOBAL__sub_I_gpumat.cpp:gpumat.cpp(.text.startup._GLOBAL__sub_I_gpumat.cpp+0x38): error: undefined reference to 'std::ios_base::Init::~Init()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::bad_last_alloc::~bad_last_alloc():tbb_misc.cpp(.text._ZN3tbb14bad_last_allocD2Ev+0xe): error: undefined reference to 'std::bad_alloc::~bad_alloc()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::improper_lock::~improper_lock():tbb_misc.cpp(.text._ZN3tbb13improper_lockD2Ev+0xe): error: undefined reference to 'std::exception::~exception()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::bad_last_alloc::~bad_last_alloc():tbb_misc.cpp(.text._ZN3tbb14bad_last_allocD0Ev+0xe): error: undefined reference to 'std::bad_alloc::~bad_alloc()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::handle_perror(int, char const*):tbb_misc.cpp(.text._ZN3tbb8internal13handle_perrorEiPKc+0x38): error: undefined reference to '__cxa_allocate_exception'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::handle_perror(int, char const*):tbb_misc.cpp(.text._ZN3tbb8internal13handle_perrorEiPKc+0x4c): error: undefined reference to 'std::runtime_error::runtime_error(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::handle_perror(int, char const*):tbb_misc.cpp(.text._ZN3tbb8internal13handle_perrorEiPKc+0x6e): error: undefined reference to '__cxa_throw'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::handle_perror(int, char const*):tbb_misc.cpp(.text._ZN3tbb8internal13handle_perrorEiPKc+0xaa): error: undefined reference to '__cxa_free_exception'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::handle_perror(int, char const*):tbb_misc.cpp(.text._ZN3tbb8internal13handle_perrorEiPKc+0xbc): error: undefined reference to 'typeinfo for std::runtime_error'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::handle_perror(int, char const*):tbb_misc.cpp(.text._ZN3tbb8internal13handle_perrorEiPKc+0xc0): error: undefined reference to 'std::runtime_error::~runtime_error()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x40): error: undefined reference to '__cxa_allocate_exception'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x58): error: undefined reference to 'std::runtime_error::runtime_error(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x7c): error: undefined reference to '__cxa_throw'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x82): error: undefined reference to '__cxa_allocate_exception'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x9c): error: undefined reference to '__cxa_throw'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0xda): error: undefined reference to 'std::invalid_argument::invalid_argument(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x11c): error: undefined reference to 'std::out_of_range::out_of_range(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x15e): error: undefined reference to 'std::range_error::range_error(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x1a0): error: undefined reference to 'std::range_error::range_error(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x25e): error: undefined reference to 'std::runtime_error::runtime_error(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x2c0): error: undefined reference to 'std::runtime_error::runtime_error(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x37e): error: undefined reference to 'std::out_of_range::out_of_range(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x3dc): error: undefined reference to 'std::out_of_range::out_of_range(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x43a): error: undefined reference to 'std::invalid_argument::invalid_argument(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x498): error: undefined reference to 'std::length_error::length_error(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x4d0): error: undefined reference to 'std::out_of_range::out_of_range(std::basic_string<char, std::char_traits, std::allocator > const&)'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x532): error: undefined reference to '__cxa_free_exception'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x6c0): error: undefined reference to 'typeinfo for std::runtime_error'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x6c4): error: undefined reference to 'std::runtime_error::~runtime_error()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x6c8): error: undefined reference to 'vtable for std::bad_alloc'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x6cc): error: undefined reference to 'typeinfo for std::bad_alloc'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x6d0): error: undefined reference to 'std::bad_alloc::~bad_alloc()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x6e4): error: undefined reference to 'typeinfo for std::invalid_argument'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x6e8): error: undefined reference to 'std::invalid_argument::~invalid_argument()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x6f0): error: undefined reference to 'typeinfo for std::out_of_range'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x6f4): error: undefined reference to 'std::out_of_range::~out_of_range()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x6fc): error: undefined reference to 'typeinfo for std::range_error'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x700): error: undefined reference to 'std::range_error::~range_error()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x748): error: undefined reference to 'typeinfo for std::length_error'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function tbb::internal::throw_exception_v4(tbb::internal::exception_id):tbb_misc.cpp(.text._ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE+0x74c): error: undefined reference to 'std::length_error::~length_error()'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function typeinfo for tbb::missing_wait:tbb_misc.cpp(.data.rel.ro._ZTIN3tbb12missing_waitE+0x8): error: undefined reference to 'typeinfo for std::exception'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function typeinfo for tbb::bad_last_alloc:tbb_misc.cpp(.data.rel.ro._ZTIN3tbb14bad_last_allocE+0x8): error: undefined reference to 'typeinfo for std::bad_alloc'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function typeinfo for tbb::invalid_multiple_scheduling:tbb_misc.cpp(.data.rel.ro._ZTIN3tbb27invalid_multiple_schedulingE+0x8): error: undefined reference to 'typeinfo for std::exception'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(tbb_misc.cpp.o): in function typeinfo for tbb::user_abort:tbb_misc.cpp(.data.rel.ro._ZTIN3tbb10user_abortE+0x8): error: undefined reference to 'typeinfo for std::exception'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(market.cpp.o): in function typeinfo for tbb::internal::no_copy:market.cpp(.data.rel.ro._ZTIN3tbb8internal7no_copyE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__vmi_class_type_info'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(market.cpp.o): in function typeinfo for tbb::internal::market:market.cpp(.data.rel.ro._ZTIN3tbb8internal6marketE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__vmi_class_type_info'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(private_server.cpp.o): in function typeinfo for tbb::internal::rml::private_server:private_server.cpp(.data.rel.ro._ZTIN3tbb8internal3rml14private_serverE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__vmi_class_type_info'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(task.cpp.o): in function typeinfo for tbb::interface5::internal::task_base:task.cpp(.data.rel.ro._ZTIN3tbb10interface58internal9task_baseE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__vmi_class_type_info'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(task_group_context.cpp.o): in function tbb::captured_exception::move():task_group_context.cpp(.text._ZN3tbb18captured_exception4moveEv+0x32): error: undefined reference to '__cxa_call_unexpected'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(task_group_context.cpp.o): in function tbb::captured_exception::set(char const*, char const*):task_group_context.cpp(.text._ZN3tbb18captured_exception3setEPKcS2_+0x58): error: undefined reference to '__cxa_call_unexpected'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(task_group_context.cpp.o): in function tbb::captured_exception::clear():task_group_context.cpp(.text._ZN3tbb18captured_exception5clearEv+0x1a): error: undefined reference to '__cxa_call_unexpected'
    /home/vmg/workspace/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi-v7a/libtbb.a(task_group_context.cpp.o): in function tbb::captured_exception::destroy():task_group_context.cpp(.text._ZN3tbb18captured_exception7destroyEv+0x1e): error: undefined reference to '__cxa_call_unexpected'
    collect2: ld returned 1 exit status
    make[1]: *** [obj/local/armeabi-v7a/libvirtual.so] Error 1
    make[1]: Leaving directory `/home/vmg/android/android/vlc-android'
    make: *** [vlc-android/obj/local/armeabi-v7a/libvlcjni.so] Error 2
    rm android-libs/libmedia.c android-libs/libutils.c android-libs/libstagefright.c android-libs/libbinder.c

    Necesito ayuda, no sé cómo solucionarlo.

    Muchas gracias

Deja un comentario

Tu dirección de correo electrónico no será publicada.

*