Skip to content

Could you spend time to help me to resolve error in build .so file? #12

Description

@badpaybad

I try write my own C code
Then load using this ffi:

// load by manual copy to folder android/src/main/jniLibs
final dylib1 = ffi.DynamicLibrary.open("libsimpleso.so");

Then got these error. Did I got problem when use cmake to build .so file

E/flutter ( 4013): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'libsimpleso.so': dlopen failed: library "libc.so.6" not found
E/flutter ( 4013): #0 _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11:43)
E/flutter ( 4013): #1 new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:22:12)

Code C just simple bellow.

#include <stdio.h>
void hello_world_1()
{
    printf("Hello World\n");
}

int sum_1(int a, int b)
{
    printf("c called sum\n");
    return a + b;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions