Skip to content

32位平台,使用 tess_model 模型,调用 OcrAuto 报错 #153

@jicaiyu

Description

@jicaiyu

Describe the bug
注册 op 插件: 成功
OP 插件创建成功, 版本: 0.4.5.0
OcrWrapper::OcrWrapper()
error: LoadLibraryA false:�Ҳ���ָ����ģ�顣

如果使用 64位时是正常的

环境:
1.8_32 位 JDK
op_x86.dll
image

注册的代码
public class RegisterOp {
private static volatile int result = 0;
// 加载本地库
public interface ToolsLibrary extends Library {
String absolutePath = FileUtils.getAbsolutePath("/op/x32/tools_86.dll");
ToolsLibrary INSTANCE = (ToolsLibrary) Native.load(absolutePath, ToolsLibrary.class);
int setupA(String path, String format);
}

public static void register () {
    if (result == 0) {
        String absolutePath = FileUtils.getAbsolutePath("/op/x32/op_x86.dll");
        result = ToolsLibrary.INSTANCE.setupA(absolutePath, "UTF-16");
        Console.log("注册 op 插件: {}", result == 1? "成功": "失败");
    }
}

}

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