Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Re: Shared libr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 9 Topic 5660 of 5828
Post > Topic >>

Re: Shared library in Ada

by Sebastien <seb.morand@[EMAIL PROTECTED] > Apr 19, 2008 at 01:51 PM

> I suppose you are referring to dynamic linking at the OS level?

Yes I am.

> In this case you need to im****t functions from the library, perhaps
> using pragma Im****t. Also, have a look at descriptions of the Ada
> package hierarchy "Interfaces"

But it's for interfacing with other languages, isn't it?
The point is I don't want to interface with some other language, I want 
to create Shared object in Ada and then link with this shared object

> The im****ted functions will have to match subprogram declarations
> in your package mylibpkg.

So you mean that if I use the pragma ex****t in my ads file, everything 
is going to be fine?

For instance:
function My_Ada_Function return Integer is begin
   return 1;
end My_Ada_Function;
pragma Ex****t
(Convention    => C,
  Entity        => My_Ada_Function,
  External_Name => "My_Ada_Function" );

Or will I have to get two ads file? One with the pragma Ex****t to create 
the shared object, and then one with the Pragma im****t to use the shared 
object in my program?

> The do***entation that came with your compiler should explain
> the switches needed for linking with shared libraries.

Yes I think I can find out by myself especially because I'm using gnat ;-)

Sebastien
 




 9 Posts in Topic:
Shared library in Ada
Sebastien <seb.morand@  2008-04-19 13:27:24 
Re: Shared library in Ada
Georg Bauhaus <rm.tsoh  2008-04-19 13:41:14 
Re: Shared library in Ada
Sebastien <seb.morand@  2008-04-19 13:51:31 
Re: Shared library in Ada
Robert A Duff <bobduff  2008-04-19 11:31:17 
Re: Shared library in Ada
Ludovic Brenta <ludovi  2008-04-19 13:52:32 
Re: Shared library in Ada
Sebastien <seb.morand@  2008-04-19 13:55:16 
Re: Shared library in Ada
Sebastien <seb.morand@  2008-04-19 14:47:43 
Re: Shared library in Ada
Ludovic Brenta <ludovi  2008-04-19 15:39:38 
Re: Shared library in Ada
=?ISO-8859-1?Q?S=E9bastie  2008-04-21 10:09:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 14:43:21 CDT 2008.