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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3d1c21a87689d7bd,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-11 05:31:25 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: happysegfault@yahoo.com (Happy Segfault) Newsgroups: comp.lang.ada Subject: Minimal pragma Export (StdCall... example? Date: 11 Mar 2004 05:31:24 -0800 Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 68.184.214.99 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1079011885 32323 127.0.0.1 (11 Mar 2004 13:31:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 11 Mar 2004 13:31:25 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:6232 Date: 2004-03-11T05:31:24-08:00 List-Id: Hi all, I'm trying to write a DLL using GNAT 3.15p on Windows XP. The DLL needs to export functions with the StdCall calling convention so that they can be called from Visual Basic. Using samples/dll/ from the gwindows distribution as a starting point, I haven't been successful in getting this to work. If I just change the occurrences of pragma Export (C... to pragma Export (StdCall..., the Ada test driver program call_gw_dll.adb fails to link because the link library libgw_in_a_dll.a exports "_pop_a_window" only, while the linker wants "pop_a_window@0". Neither of these is the "_pop_a_window@0" I would have expected to see for a StdCall function. Does anybody have a minimal set of code for a DLL, test program, and makefile that demonstrates building a StdCall DLL using GNAT on Windows? Best regards, John