Open SungchangChoi opened 1 year ago
One thing that I might not have explained correctly in the readme is the way you have to tell dart where it can find your compiled dartedflib. Depending on how you start the program you can do the following:
When you want to run the program directly from visual studio code, it is best to set EDFLIB_PATH
as an environment variable. For example, in your launch.json, or in your workspace file.
I have set it in my workspace file like so:
"settings": {
"dart.env": {
"EDFLIB_PATH": "third_party/edflib/linux/libedflib.so",
},
},
When you have created an executable of your application, the file dartedflib.so is best to locate next to your executable. There are some other paths where it will search, and that depends on the implementation of dylib.
See https://github.com/Praxa-Sense/dartedflib/blob/main/lib/src/dylib.dart for how dylib is called. See https://github.com/ubuntu-flutter-community/dylib.dart/blob/main/lib/dylib.dart for more info on how it is resolved.
I hope this answers your question. Good luck with setting up the library!
I've been re-reading your question and I see that you have put the path in the correct place. What kind of flutter project are you making, since you try to run it over a VM? Is it a windows or a linux project?
I've been re-reading your question and I see that you have put the path in the correct place. What kind of flutter project are you making, since you try to run it over a VM? Is it a windows or a linux project?
My flutter project is targeting iOS and Android. I am using Android Stuido on Windows 10 . Above Exception was thrown when run the main dart file as debug mode for Android (API 32) device
I think this is happen since my short of knowledge and experience for ffi and dylib. T^T
I need more study.
Thanks for your kind answer~~~~
I have only tested this library on windows, linux and macOS. The company I made this library for is not interested in an Android version.
I would like to generate a file in EDF format. So I processed steps below.
I runned my project and click the button that calls EdfWriter( ) method, then I got this message.
E/flutter ( 7439): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'libedflib.so': dlopen failed: library "libedflib.so" not found E/flutter ( 7439): #0 _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11:43) E/flutter ( 7439): #1 new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:22:12) E/flutter ( 7439): #2 dylib (package:dartedflib/src/dylib.dart:8:47) E/flutter ( 7439): #3 new EdfWriter (package:dartedflib/src/edf_writer.dart:82:15) E/flutter ( 7439): #4 saveMeasureData (package:fitsig_pro/F7_UI/P20_MEASURE/df_measure.dart:413:18)
flutter doctor said, PS D:\WORK\FITSIG\CODE\FT\fitsig_pro> flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel master, 3.9.0-7.0.pre.32, on Microsoft Windows [Version 10.0.19045.2965], locale ko-KR) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.2) [√] Android Studio (version 2022.1) [√] VS Code (version 1.78.2) [√] Connected device (1 available) [√] Network resources
• No issues found!
I don't know what i have to do. Is there additional job i have to do? Thanks you commets in advance~ : )