title: Create an DLL written in Ada
body: <p>I'm trying to write an Ada DLL that just do common divison. The problem is that I cannot create the DLL since division in Ada seams to use and exception (probably checks that denominator is non-zero) and therefor gives me the following error message when I try to create the DLL:</p>
  
  <pre><code>C:\Programs\GPS\Math&gt;gcc -shared -shared-libgcc -o math.dll division.o
  division.o:division.adb:(.text+0x1f): undefined reference to
  `__gnat_rcheck_CE_Divide_By_Zero'
  collect2.exe: error: ld returned 1 exit status
  </code></pre>
  
  <p>My divison package looks as follows:</p>
  
  <pre><code>-- division.ads
  package Division is
     function Div
       (A : INTEGER;
        B : INTEGER)
        return INTEGER;
     pragma Export (CPP, Div);
  end Division;
  
  --division.adb
  package body Division is
     function Div(A : INTEGER; B : INTEGER) return INTEGER is
        X : INTEGER := A/B;
     begin
        return X;
     end Div;
  end Division;
  </code></pre>
  
  <p>Is it possible to create this DLL is some way? I'm totally new to Ada so please keep it simple. </p>