dart/ flutter 加载so/dll文件错误码

error code 126

表示没要找到对应目录下的文件

Unhandled exception:
Invalid argument(s): Failed to load dynamic library 'D:XXXXXXXX/XXX/test.so': error code 126
#0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:12:43)
#1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:23:12)
#2      main (file:///XXXXXXX/testso/testso.dart:38:32)
#3      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)

error code 127

表示某一个函数没要对外开放,在VS编译中的文件一般缺少.def文件或者def文件中缺少这个函数名称
报错代码

Unhandled exception:
Invalid argument(s): Failed to lookup symbol 'XXXXX': error code 127
#0      DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:34:70)
#1      main (file:///XXXXXXX/testso.dart:70:9)
#2      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
#3      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)

error code 193

表示运行系统与生成的so文件不兼容,一个是32位一个是64位,如果在win10上运行需要编译成64位的

Unhandled exception:
Invalid argument(s): Failed to load dynamic library 'xxxxx\xxx\test.so': error code 193
#0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:12:43)
#1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:23:12)
#2      main (file:///XXXXXXX/testso.dart:38:32)
#3      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)

目前就遇到这三个问题

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值