Skip to content

Bug: Windows DLL not bundled due to typo in CMakeLists.txt #1

@imLeGEnDco55

Description

@imLeGEnDco55

Description

In windows/CMakeLists.txt, the variable name flutter_embedding_bundled_libraries is used instead of the correct flutter_embedder_bundled_libraries.

Flutter's build system expects the variable to match ${plugin_name}_bundled_libraries (i.e. flutter_embedder_bundled_libraries), so the native library is never bundled into the Windows build output.

Steps to Reproduce

  1. Add flutter_embedder as a dependency
  2. Run flutter build windows
  3. The resulting executable crashes because the DLL is missing from the bundle

Expected Behavior

The ONNX Runtime DLL should be automatically bundled via CMake.

Current Workaround

Manually editing the file in .plugin_symlinks/flutter_embedder/windows/CMakeLists.txt, but this gets overwritten on flutter clean.

Fix

-set(flutter_embedding_bundled_libraries
+set(flutter_embedder_bundled_libraries

Line 18 of windows/CMakeLists.txt.

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