美文网首页
Please supply one or more path/t

Please supply one or more path/t

作者: 毛毛v5 | 来源:发表于2024-03-26 06:39 被阅读0次

flutter pub run ffigen 错误如下。

PS D:\dev\project\git\shadowscore> flutter pub run ffigen --config ffigen.yaml
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Deprecated. Use `dart run` instead.
Building package executable... (3.3s)
Built ffigen:ffigen.
Running in Directory: 'D:\dev\project\git\shadowscore'
[SEVERE] : Couldn't find dynamic library in default locations.
[SEVERE] : Please supply one or more path/to/llvm in ffigen's config under the key 'llvm-path'.
Unhandled exception:
Exception: Couldn't find dynamic library in default locations.

需要指定LLVM的路径,ffigen.yaml的代码如下:

# Run with `flutter pub run ffigen --config ffigen.yaml`.
name: ShadowscoreBindings
description: |
  Bindings for `src/shadowscore.h`.

  Regenerate bindings with `flutter pub run ffigen --config ffigen.yaml`.
output: 'lib/shadowscore_bindings_generated.dart'
headers:
  entry-points:
    - 'src/shadowscore.h'
  include-directives:
    - 'src/shadowscore.h'
preamble: |
  // ignore_for_file: always_specify_types
  // ignore_for_file: camel_case_types
  // ignore_for_file: non_constant_identifier_names
comments:
  style: any
  length: full
llvm-path: // 这里这里这里
  - 'D:\dev\tools\LLVM'

相关文章

网友评论

      本文标题:Please supply one or more path/t

      本文链接:https://www.haomeiwen.com/subject/ytxstjtx.html