Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'll do the best I can with this, given not much Perl knowledge.</p> <p>It looks to me like the <a href="http://perldoc.perl.org/DynaLoader.html" rel="nofollow">Dynaloader</a> in perl is a utility that lets you load dynamicly loadable libraries (lib*.so's on Unix systems) into a perl program.</p> <p>For that to work for an Ada program, there are several things you'll need to take into account.</p> <ol> <li>You need to build your Ada program as a proper dynamic library. It looks like you did that. However, I'm no expert on this, so perhaps you missed something. I'd highly suggest looking over TFM on this.</li> <li>You need to call your Ada code properly. Ada programs generally require a process called "elaboration" be performed before any actual code may be run. To accomplish this, most Ada compilers create a special entry-point to the program, rather than just using the one associated with your "main" routine. I think Gnat's is something like <code>C_yourprogramname</code>, but don't hold me to that. Even if you are implementing a library of some sort, the elaboration should be run first (execpt in some special circumstances, that do not apply here). However, if you want a routine to be a library routine called from outside of Ada, you generally don't want a "main", so there are some extra steps. How to do this with Gnat is <a href="http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Binding-with-Non_002dAda-Main-Programs.html#Binding-with-Non_002dAda-Main-Programs" rel="nofollow">described in their user guide</a>, but in general it involves telling the compiler to not make a "main", calling <code>adainit</code> before running any Ada routine from outside, and calling <code>adafinal</code> when you are all done.</li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload