comp.lang.ada
 help / color / mirror / Atom feed
* Calling a DLL from GNAT
@ 2005-12-19 13:39 markp
  2005-12-20 13:39 ` Gene
  2005-12-20 20:37 ` Per Sandberg
  0 siblings, 2 replies; 3+ messages in thread
From: markp @ 2005-12-19 13:39 UTC (permalink / raw)


I am going to be provided a DLL of C functions that I need to interface
with in GNAT. I know how to call C functions from Ada. However, I'm not
sure how to link the DLL in with the Ada source code under the GPS
environment. Could anyone assist in this?

Thank you.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Calling a DLL from GNAT
  2005-12-19 13:39 Calling a DLL from GNAT markp
@ 2005-12-20 13:39 ` Gene
  2005-12-20 20:37 ` Per Sandberg
  1 sibling, 0 replies; 3+ messages in thread
From: Gene @ 2005-12-20 13:39 UTC (permalink / raw)


That GNAT documentation describes this pretty well.

http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Using-DLLs-with-GNAT.html#Using-DLLs-with-GNAT


Perhaps you can come back with specific questions.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Calling a DLL from GNAT
  2005-12-19 13:39 Calling a DLL from GNAT markp
  2005-12-20 13:39 ` Gene
@ 2005-12-20 20:37 ` Per Sandberg
  1 sibling, 0 replies; 3+ messages in thread
From: Per Sandberg @ 2005-12-20 20:37 UTC (permalink / raw)


If you are using .gpr files and a farly new GNAT then it may be possible 
to do it this way

project externallib is
   for Source_Dirs use ();
   for Library_Dir use "relative path to dll from project file"
   for Library_Name use "what ever the basename of the dll is";
   for library_kind use "dynamic";
end externallib;

with "externallib";
project the_proj is

end the_proj;


It is all well described in
"http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Stand_002dalone-Library-Projects.html#Stand_002dalone-Library-Projects"
the GNAT users guide covering library projects.


/Per

markp wrote:
> I am going to be provided a DLL of C functions that I need to interface
> with in GNAT. I know how to call C functions from Ada. However, I'm not
> sure how to link the DLL in with the Ada source code under the GPS
> environment. Could anyone assist in this?
> 
> Thank you.
> 




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-20 20:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-19 13:39 Calling a DLL from GNAT markp
2005-12-20 13:39 ` Gene
2005-12-20 20:37 ` Per Sandberg

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