Flutter on Windows: how to call an external dll?

795

I was also digging this theme for quite a while. I was able to find following infomation:

  • Each platform requires different way of C/C++ dynamic/static libraries integration, thus it won't be possible to simply add '.dll'/'.so'/etc to, say, '/assets' folder
  • To include dynamic library in Ios and Android flutter project you have to make several changes in 'ios'/'android' folders respectively

You can try out those materials, they might help you:

Share:
795
魔咔啦咔
Author by

魔咔啦咔

Updated on December 19, 2022

Comments

  • 魔咔啦咔
    魔咔啦咔 over 1 year

    Example: I want to call libffmpeg.dll in flutter-windows-app. Where should I put the libffmpeg, make it could be packed in release and debug app, so i just use ffi.DyncamicLibrary.open('libffmpeg.dll') to call the native functions ? Should i need to change the windows indrectory? and how to achieve it?