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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:45:08+00:00 2026-05-22T20:45:08+00:00

I compiled this library using NDK into an .so. I can successfully load it

  • 0

I compiled this library using NDK into an .so. I can successfully load it with System.LoadLibary() but when I try the example code for the library, it throws an UnsatisfiedLinkError. I checked the source code for the library and it indeed has the functions I’m using with the same parameters (except JNIEnv and jobject) along with the same returns. Plus, surely the creator of the library would share working example code. So what am I doing wrong? I copied the exact code from the page, and changed the variable names accordingly.

  • 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-22T20:45:09+00:00Added an answer on May 22, 2026 at 8:45 pm

    Without more detail it’s difficult to say. Having looked at the library on that site, it’s possible that you’ve named your class differently. You need to call your Java class Giffle and it has to be in the package org.jiggawatt.giffle. This isn’t a naming convention that you would stumble upon by accident 😉

    package org.jiggawatt.giffle;
    
    public class Giffle {
        static {
            System.loadLibrary("gifflen");
        }
    
        public native int Init(String gifName, int w, int h,
                int numColors, int quality,
                int frameDelay);
        public native void Close();
        public native int AddFrame(int[] inArray);
    }
    

    To use it, you would either make the calls in the Giffle class, or probably a cleaner way is to use an instance:

    Giffle giffle = new Giffle();
    giffle.Init(...);
    giffle.AddFrame(...);
    giffle.Close();
    

    Does seem a bit odd that the Java part wasn’t in the zip, especially as the class name is hardcoded into the C symbol. Maybe the guy who wrote it had a whole bunch of extra code in the Java part that he didn’t want anyone to see.

    As far as I can tell, the C and C++ code is complete. You shouldn’t need to modify it at all. The implementations of the native methods are in gifflen.cpp, and have names like Java_org_jiggawatt_giffle_Giffle_Init. They have the correct native-side arguments for the JNI calling convention.

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

Sidebar

Related Questions

I have a Matlab function compiled into C library. I am using this library
I'm looking into using this library for our Java-application: http://code.google.com/p/aparapi/ . One requirement for
I have a compiled external library that I'm using in my (Objective-C++) code. This
i am using this code to check if my glsl shader compiled fine. glGetObjectParameterivARB(obj,
I have a C++ 'Control Library Project' compiled using /CLR. Inside this project there
Has anybody successfully imported the eigen library using the ndk? I was thinking about
I've got a C#/NUnit test calling into a C++ library compiled using the Intel
This code, when compiled in xlC 8.0 (on AIX 5.3), produces the wrong result.
I'm sure this is a newbie question, but every time I've compiled/dl'ed a new
I have compiled a .NET application using Any CPU option. This .NET application uses

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.