Call a function in a shared library: Difference between revisions

→‎{{header|Perl 6}}: update for more strict type constraints
(→‎{{header|Perl 6}}: update for more strict type constraints)
Line 1,246:
See [[Call_a_function_in_a_shared_library#Delphi | Delphi]]
=={{header|Perl 6}}==
{{works with|Rakudo|20152018.1203}}
<lang perl6>use NativeCall;
 
constant libX11 = '/usr/lib/x86_64-linux-gnu/libX11.so.6';
 
sub XOpenDisplay(Str $s --> Intint32) is native(libX11) {*}
sub XCloseDisplay(Intint32 $i --> Intint32) is native(libX11) {*}
 
if try my $d = XOpenDisplay ":0.0" {
10,327

edits