From: markp on
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.

From: Gene on
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.

From: Per Sandberg on
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.
>