Call a function in a shared library: Difference between revisions

Content added Content deleted
(Added Go)
m (→‎{{header|Go}}: Corrected typo.)
Line 816: Line 816:
{{works with|Ubuntu 18.04}}
{{works with|Ubuntu 18.04}}
<br>
<br>
Dynamically calling a function from a shared library can only be accomplished in Go using 'cgo' and, even then, the function pointer returned by 'dlsysm' can only be called via a C bridging function as calling C function pointers directly from Go is not currently supported.
Dynamically calling a function from a shared library can only be accomplished in Go using 'cgo' and, even then, the function pointer returned by 'dlsym' can only be called via a C bridging function as calling C function pointers directly from Go is not currently supported.


This is the C code to produce fakeimglib.so:
This is the C code to produce fakeimglib.so:
Line 884: Line 884:
<pre>
<pre>
Same as C entry.
Same as C entry.
</pre>
</pre>


=={{header|Haskell}}==
=={{header|Haskell}}==