comp.lang.ada
 help / color / mirror / Atom feed
* ada import c function
@ 2009-04-28 20:45 s. ashen
  2009-04-28 21:18 ` Maciej Sobczak
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: s. ashen @ 2009-04-28 20:45 UTC (permalink / raw)


Does anyone import C function to ada??
Using gnat 3.15, i try to compile the example which contain two files
  use_of_import.adb

procedure Use_Of_Import is
   procedure Imported_Function;
   pragma Import (C, Imported_Function, "imported_function");
begin
   Imported_Function;
end Use_Of_Import;

  imported_function.c

#include <stdio.h>
imported_function ()
{
  printf ("\nI am now in the imported function\n\n");
}

does anyone know how to compile this program, i had tried many in many
ways, but i can't do this.. always occurred some  errors.



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

end of thread, other threads:[~2009-05-01  5:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-28 20:45 ada import c function s. ashen
2009-04-28 21:18 ` Maciej Sobczak
2009-04-28 21:40 ` sjw
2009-04-28 23:08 ` 459143320
2009-04-29 16:00   ` s. ashen
2009-04-29 19:03   ` sjw
2009-04-29 23:04     ` anon
2009-04-30 20:48       ` sjw
2009-04-30 21:32         ` Gautier
2009-04-30 23:42           ` linking with g++ (was: ada import c function) Björn Persson
2009-05-01  5:48             ` linking with g++ Gautier

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