Fixed #39679 make sqlite ffi sample run success

Closes #39680
https://github.com/dart-lang/sdk/pull/39680

GitOrigin-RevId: 08a6f2c661d645f14ff41c13292002028bc10323
Change-Id: I5100521fa011be5167d00e5610bd87cb2f78093b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127456
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
netroby 2019-12-12 09:04:11 +00:00 committed by commit-bot@chromium.org
parent e2d5aa352c
commit 1f791e0668
2 changed files with 15 additions and 2 deletions

View file

@ -2,6 +2,20 @@
This is an illustrative sample for how to use `dart:ffi`.
## Prerequirement
For Windows, Linux, and MacOS, you should make sure, sqlite dev lib installed on your system.
Windows user can download dll from https://www.sqlite.org/download.html
If you do not have any sqlite3.dll or so file, you may found error message:
```
Unhandled exception:
Invalid argument(s): Failed to load dynamic library (126)
#0 _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:13:55)
#1 new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:22:12)
```
## Building and Running this Sample

View file

@ -6,7 +6,6 @@ author: Daco Harkes <dacoharkes@google.com>, Samir Jindel <sjindel@google.com>
environment:
sdk: '>=2.1.0 <3.0.0'
dependencies:
ffi:
path: ../../../third_party/pkg/ffi
ffi: ^0.1.3
dev_dependencies:
test: ^1.5.3