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

  • Home
  • SEARCH
  • 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 6962707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:41:43+00:00 2026-05-27T15:41:43+00:00

I have built OpenSSL for Android(using ndk-build) and have linked it to my program.

  • 0

I have built OpenSSL for Android(using ndk-build) and have linked it to my program. Compilation and linking works, but I get a run time error of UnsatisfiedLinkError.
More specifically, the program breaks on this code:

public class TestActivity extends Activity 
{     // load the library - name matches jni/Android.mk   
    static {     
        System.loadLibrary("crypto2");   
        System.loadLibrary("ssl2");   // <=BREAKS HERE!
        System.loadLibrary("Test");   
        }  

It specifically breaks when loading ssl2, so it seems it was able to load crypto2.
I think I need to tell ssl2 that it use cryto2, I tried to do that on the Android.mk file, but it didn’t help.

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := libcrypto2
LOCAL_SRC_FILES := OpenSSL/libcrypto2.so
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := libssl2
LOCAL_SRC_FILES := OpenSSL/libssl2.so
LOCAL_SHARED_LIBRARIES := libcrypto2
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)   # Here we give our module name and source file(s)
LOCAL_C_INCLUDES := D:/DevelopTools/OpenSSL-WIN32/include $(LOCAL_PATH)/../../../Framework/Applications/FW2Prototype $(LOCAL_PATH)/../../../Graphics/Libraries/Common $(LOCAL_PATH)/../../../Input/Libraries/Common $(LOCAL_PATH)/../../../Audio/Libraries/Common $(LOCAL_PATH)/../../../Audio/Libraries/NullAudio $(LOCAL_PATH)/../../../Network/Libraries/Common
LOCAL_MODULE    := Test 
LOCAL_SRC_FILES := Test.cpp Reference.cpp JNINetwork.cpp JNIGraphics2D.cpp JNIInput.cpp JNIAudio.cpp Applications/FatalWars2/FatalWars2.cpp /../../../Audio/Libraries/NullAudio/NullAudio.cpp
LOCAL_SHARED_LIBRARIES := libcrypto2 libssl2
include $(BUILD_SHARED_LIBRARY) 

Any idea what is wrong?

Thanks,

  • 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-05-27T15:41:44+00:00Added an answer on May 27, 2026 at 3:41 pm

    I “solved” this.
    I simpley built openssl into a single so file. I built both crypto and ssl statically, so ssl’s dependency in crypto was hidden inside the static linking.
    The issue is apparently that I couldn’t load the prebuilt shared library ssl, because it was dependant of another prebuilt shared library(crypto). Maybe it’s possible to load such libraries somehow, but my solution was just to static link crypto into ssl and then into a shared library called openssl.

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

Sidebar

Related Questions

Hi I'm in need to build OpenSSL lib for Android NDK r5b, today it
I have used pre-build static libs of OpenSSL 1.0, but it makes my binary
I have built a web page which contains a Crystal Report built using the
I have built a blog application using Ruby on Rails. In the application I
I have built a blog using Ruby on Rails. New to both. I am
I need to build the latest OpenSSL (1.0.0g) for an Android application. I am
I've implemented AES/CTR on Android using the built-in Cipher class. Decryption appears to be
I have some problems using OpenSSL. I'm following the tutorial for compiling OpenSSL for
1.Download source from OpenSSL (openssl-1.0.0d). 2.Build it static using this: > perl Configure VC-WIN32
I have downloaded the latest OpenSSL source package. I want to build it with

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.