sony/flutter-embedded-linux

flutter_elinux.h not C importable

Closed this issue · 8 comments

flutter_elinux.h appears to be C-compatible by virtue of its extern "C" guard but it includes some definitions with reference parameters:

FLUTTER_EXPORT FlutterDesktopViewControllerRef
FlutterDesktopViewControllerCreate(
    const FlutterDesktopViewProperties& view_properties,
    FlutterDesktopEngineRef engine);

FLUTTER_EXPORT FlutterDesktopEngineRef FlutterDesktopEngineCreate(
    const FlutterDesktopEngineProperties& engine_properties);

This causes problems with languages such as Swift that do not support C++ interoperability (at least, in shipping versions).

Upstream raised and fixed this in flutter/flutter#75465.

Also would be nice to import FlutterDesktopMessengerAddRef and FlutterDesktopMessengerRelease if possible.

Should be fixed in https://github.com/PADL/flutter-embedded-linux/tree/lhoward/345 (didn't create a PR, per README).

Thank you. Can you please create a PR with Developer’s Certificate of Origin (DCO) in your commit message? Also, please update (AUTHORS)[https://github.com/sony/flutter-embedded-linux/blob/master/AUTHORS] too.

Also would be nice to import FlutterDesktopMessengerAddRef and FlutterDesktopMessengerRelease if possible.

Remaining task.

I will do, I need to figure out how to build it before trying anything more substantial.

Okay, thank you.

Closing. Thank you so much, Ihoward!

Thank you for merging so quickly. I've tested the latest main with my Swift wrapper and it is working :)