comp.lang.ada
 help / color / mirror / Atom feed
From: George J <ivanov_george@list.ru>
Subject: Ada,static link dll.(windows)
Date: Mon, 30 May 2016 02:08:08 -0700 (PDT)
Date: 2016-05-30T02:08:08-07:00	[thread overview]
Message-ID: <e4696f0e-f352-48b1-ac53-d74a496ce66f@googlegroups.com> (raw)

Hi ALL!So,today I've got a problem with dll:
I have .dll (made with FASM) and I want to link it statically to my Ada project. I've always made this way (https://rosettacode.org/wiki/Call_a_function_in_a_shared_library#Windows) by dinamically linking. So I want to link my dll statically. I've spent 6 hours and couldn't find any solution.

p.s. my way was
1. pragma Import(Stdcall,myProc,"myProc",Link_Name => "myDLL.dll");
result: undefined reference to "myDLL.dll"
2. pragma Import(Stdcall,myProc,"myProc");
result: undefined reference to myProc@8 (yes,it has to DWORD params)
and other attempts.
--------------------------------------------------------------------------

I have Thin package with 
------------------------------------
with Win32;

package Thin is

   procedure myProc
     (Major : Win32.DWORD;
      Minor : Win32.DWORD);
   pragma Import(Stdcall,myProc,"myProc"); --,Link_Name => "myDLL.dll");
   --pragma Linker_Options("-myDLL");

end Thin;
--------------------------------------

and Main proc with
--------------------------
with Thin;
procedure Main is
begin
      Thin.myProc(1,2);
end Main;
-------------------------

             reply	other threads:[~2016-05-30  9:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30  9:08 George J [this message]
2016-05-30  9:09 ` Ada,static link dll.(windows) George J
2016-05-30  9:39   ` Dmitry A. Kazakov
2016-05-30 10:48     ` George J
2016-05-30 11:33       ` George J
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox