From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada,static link dll.(windows) Date: Mon, 30 May 2016 11:39:09 +0200 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: G7MXAklp0OAVRSdfcmpxRQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:30513 Date: 2016-05-30T11:39:09+02:00 List-Id: 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