Unable to load win DLL in flutter windows desktop with Release build
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
Hi Guys,
I am working on flutter windows desktop application. I have used the following dart ffi method to load win x64 DLL and it is working fine while running in debug mode using Android Studio. Perfectly fine.
`
final path = Assets.sdksADDMETHOD;
ffi.DynamicLibrary.open(path);
`
But when I generated a release build using this command,
**flutter build windows --target lib/main_staging.dart**
With the above command we do get the exe file. By running that file, the app is running successful but the DLL code is not working. The path to DLL from the assets is a valid path but we are getting the following exception only in release mode. But the same code is working fine in debug mode.
**DynamicLibrary.open error: Invalid argument(s): Failed to load dynamic library (126)**
Please suggest any solution or what i am missing.
Thank you.
Asif.
Contributor guide
Assessment
This issue has not been assessed yet.