Bindings for DLL with GNAT

From: Bernd Specht (Bernd.Specht_at_gmx.com)
Date: 03/25/04


Date: 25 Mar 2004 12:59:42 GMT

Hello,
 
I've some trouble with generating bindings for a dll (GNAT on Win2k).

I've written a spec containing the definitions and added:
pragma import (stdcall, XY, "XY");

Then I generated a import-library as described in gnat_ug.

When linking, the linker tells me, it miss a "XY@8". So I added the "@8" in
the ".def"-file. Then link works, but at runtime I get a message "XY@8" not
found in dll.

In fact, the name in the DLL is without "@8" (but the linker expects it).

Any ideas?

Regards,
Bernd



Relevant Pages

  • Re: Minimal pragma Export (StdCall... example?
    ... Some weeks ago I had difficulties with the same and managed to compile/link ... > I'm trying to write a DLL using GNAT 3.15p on Windows XP. ... > If I just change the occurrences of pragma Export (C... ... > would have expected to see for a StdCall function. ...
    (comp.lang.ada)
  • Re: How to spy global mouse & keyboard event?
    ... the #pragma is only a fraction of the problem. ... you have to cause the data segment to be shared ... know if I should disconnect the hook if the DLL is being unloaded. ... shared DLL, as this can cause injection of the entire MFC DLL into each process, so MFC ...
    (microsoft.public.vc.mfc)
  • Re: SetWindowsHookEx and WH_MOUSE
    ... Alright, Igor, my friend, one more question if I may. ... #pragma data_seg ... LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam) ... just want a message box to indicate that the DLL has noted a WM_LBUTTONUP. ...
    (microsoft.public.vc.language)
  • Re: how create a dll callback ?
    ... Declare a variable of procedural type in the DLL, ... orthodoxy prescribes the use of stdcall. ...
    (alt.comp.lang.borland-delphi)
  • Re: 3rd party evc++ dll help
    ... // The following ifdef block is the standard way of creating macros ... All files within this DLL are compiled with the ... #pragma message ... * Launch target app with normal launch flag ...
    (microsoft.public.dotnet.framework.compactframework)