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 7861167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:35:22+00:00 2026-06-02T22:35:22+00:00

I am trying to include Crypto++ (http://www.cryptopp.com/) in an Android NDK project. I want

  • 0

I am trying to include Crypto++ (http://www.cryptopp.com/) in an Android NDK project. I want to be able to call Crypto++ member functions from the C++ portion of my code. I thought I could just include the headers and source from Crypto++ in my C++ code but I can’t seem to get it to work.

My C++ file looks like this:

#include <jni.h>
#include "cryptopp/modes.h"
#include "cryptopp/aes.h"
using namespace CryptoPP;
...

with all of the Crypto++ headers and source files in the cryptopp subdirectory.

Initially I received many compile errors since the standard C++ libraries were not being found, but I fixed that by adding Application.mk with the following line:

APP_STL := stlport_static

Compiling with ndk-build (both the standard and crystax versions) gives me the following error:

ABI='armeabi'
ABI='armeabi-v7a'
ABI='x86'
Gdbserver      : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup       : libs/armeabi/gdb.setup
Compile++ thumb  : ndk-tests-cpp <= ndk-tests.cpp
In file included from jni/cryptopp/modes.h:7,
             from jni/ndk-tests.cpp:2:
jni/cryptopp/cryptlib.h: In static member function 'static void CryptoPP::NameValuePairs::ThrowIfTypeMismatch(const char*, const std::type_info&, const std::type_info&)':
jni/cryptopp/cryptlib.h:291: error: exception handling disabled, use -fexceptions to enable
make: *** [obj/local/armeabi/objs-debug/ndk-tests-cpp/ndk-tests.o] Error 1

I have never included an external library in an NDK project before – maybe I am just overlooking something basic.

  • 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-02T22:35:26+00:00Added an answer on June 2, 2026 at 10:35 pm

    You have to enable exceptions for your Android project. Try to include these lines into your Applications.mk:

    APP_CPPFLAGS += -frtti 
    APP_CPPFLAGS += -fexceptions
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying include this barcode source code Stefanhafeneger - Barcode github.com to my project
Trying to include ThickBox (from http://jquery.com/demo/thickbox/ ) in an ASP.NET application. Visual Studio is
I'm using this Big Integer library for Javascript: http://www.leemon.com/crypto/BigInt.js and I need to be
I was trying Include extension method from http://damieng.com/blog/2010/05/21/include-for-linq-to-sql-and-maybe-other-providers , but it does not really
I am trying to include a prompt dialog in my project. Jquery Msgbox is
Here are two hash generators: http://www.md5hashgenerator.com/index.php http://www.miraclesalad.com/webtools/md5.php Now, my question is: Why do the
I am trying to integrate some pre-existing code that relies on the com.sun.crypto.provider.SunJCE class
I am trying to include the .Net TinyMCE dll in my project. The code
I am trying include c++ library (DLL) in my c# project but every time
I'm trying to include a project within another project as EE Dependency in Eclipse.

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.