comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada,static link dll.(windows)
Date: Mon, 30 May 2016 11:39:09 +0200
Date: 2016-05-30T11:39:09+02:00	[thread overview]
Message-ID: <nih1ot$1uce$1@gioia.aioe.org> (raw)
In-Reply-To: b4c15b64-e426-4fef-961f-49b9749ebab3@googlegroups.com

On 30/05/2016 11:09, George J wrote:
> понедельник, 30 мая 2016 г., 12:08:09 UTC+3 пользователь George J написал:
>> 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");

pragma Import (Stdcall, myProc);

should be enough.

>> result: undefined reference to myProc@8 (yes,it has to DWORD params)
>> and other attempts.

Do you link to the library? Either the DLL file must be specified or 
else the DLL import static library should. The former is given as-is to 
the linker the latter using -l switch. I presume you don't have the 
latter, so it is the former. E.g.

gnatmake ... -largs myDLL.dll

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30  9:08 Ada,static link dll.(windows) George J
2016-05-30  9:09 ` George J
2016-05-30  9:39   ` Dmitry A. Kazakov [this message]
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