How to get Dart native extension demo "sample_extension" to work? -


i trying dart native extension example page work.

http://www.dartlang.org/articles/native-extensions-for-standalone-dart-vm/

i on windows. downloaded , extracted dart c:\program files\dart

i checked out dartssvn c:\projects\dartsvn can sample_extention project when open analyzer throws these problems:

"target of uri not exist: 'dart-ext:sample_extension'"

and

"native functions can declared in sdk , code loaded through native extensions"

and when try run

"cannot find extension library 'file:///c:/projects/dart/sample_extension/bin/sample_synchronous_extension.dart': error: line 7 pos 1: library handler failed import 'dart-ext:sample_extension';

'file:///c:/projects/dart/sample_extension/bin/test_sample_synchronous_extension.dart': error: line 7 pos 1: library handler failed import 'sample_synchronous_extension.dart';"

what doing wrong?

you can ignore analyzer error time. seems bug/issue current dart version.

the error "cannot find extension library... means dart vm can not find "sample_extension.dll" file inside project folder. must compile c++ source code of sample generate library (dll under windows).

the article native extensions has section called building on windows. follow instructions.


Comments

Popular posts from this blog

Java sticky instances of class com.mysql.jdbc.Field aggregating -