Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8339417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:52:47+00:00 2026-06-09T04:52:47+00:00

I get the following error when trying to perform an NDK-build… Can any one

  • 0

I get the following error when trying to perform an NDK-build…
Can any one help me?

lmImf/ImfHuf.cpp:133: undefined reference to `__cxa_throw'
    ./obj/local/armeabi-v7a/libfreeimage.a(ImfHuf.o): In function `Imf::(anonymous namespace)::invalidTableEntry()':
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:141: undefined reference to `__cxa_allocate_exception'
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:141: undefined reference to `__cxa_throw'
    ./obj/local/armeabi-v7a/libfreeimage.a(ImfHuf.o): In function `Imf::(anonymous namespace)::tooMuchData()':
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:93: undefined reference to `__cxa_allocate_exception'
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:93: undefined reference to `__cxa_throw'
    ./obj/local/armeabi-v7a/libfreeimage.a(ImfHuf.o): In function `Imf::(anonymous namespace)::invalidCode()':
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:109: undefined reference to `__cxa_allocate_exception'
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:109: undefined reference to `__cxa_throw'
    ./obj/local/armeabi-v7a/libfreeimage.a(ImfHuf.o): In function `invalidTableSize':
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:117: undefined reference to `__cxa_allocate_exception'
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:117: undefined reference to `__cxa_throw'
    ./obj/local/armeabi-v7a/libfreeimage.a(ImfHuf.o): In function `invalidNBits':
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:85: undefined reference to `__cxa_allocate_exception'
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:85: undefined reference to `__cxa_throw'
    ./obj/local/armeabi-v7a/libfreeimage.a(ImfHuf.o): In function `~AutoArray':
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/IlmImf/ImfAutoArray.h:61: undefined reference to `__cxa_end_cleanup'
    ./obj/local/armeabi-v7a/libfreeimage.a(ImfHuf.o): In function `Imf::hufUncompress(char const*, int, unsigned short*, int)':
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:1076: undefined reference to `__cxa_begin_catch'
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:1079: undefined reference to `__cxa_rethrow'
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/./IlmImf/ImfHuf.cpp:1076: undefined reference to `__cxa_end_catch'
    ./obj/local/armeabi-v7a/libfreeimage.a(ImfHuf.o):(.ARM.extab.text._ZN3Imf13hufUncompressEPKciPti+0x0): undefined reference to `__gxx_personality_v0'
    ./obj/local/armeabi-v7a/libfreeimage.a(ImfHuf.o): In function `~AutoArray':
    D:\Projects.CPP\Engine5\svn\trunk\Dependencies\FreeImage/D:/Projects.CPP/Engine5/svn/trunk/Dependencies/FreeImage/jni/../Source/OpenEXR/IlmImf/ImfAutoArray.h:61: undefined reference to `__cxa_end_cleanup'
    ./obj/local/armeabi-v7a/libfreeimage.a(ImfHuf.o):(.ARM.extab.text._ZN3Imf11hufCompressEPKtiPc+0x0): undefined reference to `__gxx_personality_v0'
    /home/flock/ANDROID/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a(unwind-arm.o): In function `__gnu_unwind_pr_common':
    /i/ndk-andrewhsieh/src.1-with-cherrypicks//build/../gcc/gcc-4.4.3/libgcc/../gcc/config/arm/unwind-arm.c:1237: undefined reference to `__cxa_call_unexpected'
    collect2: ld returned 1 exit status

My application.mk

APP_OPTIM := release
APP_PLATFORM := android-8
APP_STL := gnustl_static
APP_CPPFLAGS += -frtti 
APP_CPPFLAGS += -fexceptions
APP_CPPFLAGS += -DANDROID
APP_ABI := armeabi-v7a

And My android.mk

 LOCAL_PATH := $(call my-dir)
    include $(CLEAR_VARS)
    LOCAL_MODULE:= freeimage
    LOCAL_SRC_FILES :=libfreeimage.a
    APP_STL := gnustl_static
    include $(PREBUILT_STATIC_LIBRARY)

    include $(CLEAR_VARS)
    LOCAL_MODULE:= imageprocessing
    LOCAL_SRC_FILES:= imageprocessing.c
    LOCAL_STATIC_LIBRARIES = freeimage
    LOCAL_EXPORT_C_INCLUDES := freeimage.h
    LOCAL_LDLIBS:= -lm -llog -ljnigraphics
    APP_STL := gnustl_static
    include $(BUILD_SHARED_LIBRARY)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:52:48+00:00Added an answer on June 9, 2026 at 4:52 am

    Add this to your Application.mk:

    APP_STL := gnustl_static
    APP_CPPFLAGS += -frtti 
    APP_CPPFLAGS += -fexceptions
    

    It seems your FreeImage is build with the different run-time than your application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When trying to perform the following instructions I get an error: SQLError: 'Error #3115:
I get following error when trying to access Xampp from a network I've tried
I get the following error when trying to run my application. There are no
I get the following error when trying to push changes to github from the
i get this following error when i am trying to connect my localhost mysql
I get the following error from the SQL Script I am trying to run:
When trying to set DoMatchParen I get the following error: E492: Not an editor
I'm trying to freeze my Python3.2 project and get the following error after running
While trying to validate my forms i get the following error: Expected a {
When trying to run a junit test I get the following error - java.lang.ClassCastException:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.