Skip to content

Instantly share code, notes, and snippets.

@retupmoca
Created March 17, 2014 19:33
Show Gist options
  • Save retupmoca/9606605 to your computer and use it in GitHub Desktop.
Save retupmoca/9606605 to your computer and use it in GitHub Desktop.
moar+nativecall+precompilation bug
module foo;
use NativeCall;
sub zlibVersion() returns Str is encoded("ascii") is native("libz.so.1") is export { * };
> perl6 -I. -Mfoo -e 'say zlibVersion'
1.2.8
> perl6 --target=mbc --output=foo.moarvm foo.pm6
> perl6 -I. -Mfoo -e 'say zlibVersion'
Cannot invoke null object
in sub param_list_for at lib/NativeCall.pm6:42
in method postcircumfix:<( )> at lib/NativeCall.pm6:113
in block at -e:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment