Call a function in a shared library: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (→{{header|Perl 6}}: update for more strict type constraints) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: Update to work with 64 bit IDs (fix segfault)) |
||
Line 1,246: | Line 1,246: | ||
See [[Call_a_function_in_a_shared_library#Delphi | Delphi]] |
See [[Call_a_function_in_a_shared_library#Delphi | Delphi]] |
||
=={{header|Perl 6}}== |
=={{header|Perl 6}}== |
||
{{works with|Rakudo|2018. |
{{works with|Rakudo|2018.11}} |
||
<lang perl6>use NativeCall; |
<lang perl6>use NativeCall; |
||
⚫ | |||
constant libX11 = '/usr/lib/x86_64-linux-gnu/libX11.so.6'; |
|||
⚫ | |||
⚫ | |||
⚫ | |||
if try my $d = XOpenDisplay ":0.0" { |
if try my $d = XOpenDisplay ":0.0" { |
||
Line 1,259: | Line 1,257: | ||
} |
} |
||
else { |
else { |
||
say "No |
say "No X11 library!"; |
||
say "Use this window instead --> ⬜"; |
say "Use this window instead --> ⬜"; |
||
}</lang> |
}</lang> |
||
{{out}} |
{{out}} |
||
<pre>ID = |
<pre>ID = 94722089782960</pre> |
||
=={{header|Phix}}== |
=={{header|Phix}}== |