From: lifetime n00b <anonymous@yahoo.com>
Subject: load and use a ".o" file?
Date: Thu, 18 Dec 2003 23:31:29 GMT
Date: 2003-12-18T23:31:29+00:00 [thread overview]
Message-ID: <lNqEb.3288$2t6.2809@newssvr23.news.prodigy.com> (raw)
I've been trying to educate myself on how to do this, but I can't seem
to find the answers I need. In concept, what I need to be able to do
seems like it should be simple, and so I'll give a simple example.
There is a main program loop already running, and there is a ".o"
compiled object file (compiled with gnat) which *hasn't* been linked
into the main program, but it has a procedure or function in it I want
to call. Let's say it is very simple function which was compiled from this:
function HiThere return String is
begin
return "Hi there!";
end HiThere;
Instead of linking this into an executable, it is just compiled with
say, "gnatmake -c hithere", to get the "hithere.o" file we're interested in.
Now, how can I load this "hithere.o" file into an already running
program (without linking it in beforehand) and then call the "HiThere"
function from that program (which was also written in Ada)? Would the
information in the corresponding .ali file be of use? Maybe I'm thinking
about it wrong, and the source which compiles to the object file needs
to have some access types or some other mechanisms in place? Note that
I'm not talking about using a .dll or .so file, just the .o file.
Any guidance would be appreciated.
next reply other threads:[~2003-12-18 23:31 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-18 23:31 lifetime n00b [this message]
2003-12-18 23:59 ` load and use a ".o" file? Stephen Leake
2003-12-19 1:51 ` tmoran
2003-12-19 15:28 ` lifetime n00b
2003-12-19 18:08 ` Stephen Leake
2003-12-20 20:12 ` lifetime n00b
2003-12-20 21:15 ` tmoran
2003-12-20 23:41 ` lifetime n00b
2003-12-21 7:15 ` tmoran
2003-12-21 11:46 ` Simon Wright
2003-12-21 13:57 ` Stephen Leake
2003-12-22 19:29 ` lifetime n00b
2003-12-22 20:49 ` Jon S. Anthony
2003-12-22 23:15 ` Stephen Leake
2003-12-23 1:36 ` tmoran
2003-12-27 22:55 ` Jon S. Anthony
2003-12-28 3:28 ` Stephen Leake
2003-12-28 16:14 ` Georg Bauhaus
2003-12-29 22:45 ` Jon S. Anthony
2003-12-29 22:42 ` Jon S. Anthony
2003-12-30 15:17 ` lifetime n00b
2003-12-30 16:56 ` Stephen Leake
2003-12-22 15:50 ` Mark H Johnson
2003-12-22 19:46 ` lifetime n00b
2003-12-22 22:58 ` Mark H Johnson
2003-12-23 17:48 ` Robert I. Eachus
2003-12-23 17:59 ` Mark H Johnson
2003-12-23 21:53 ` Robert I. Eachus
2003-12-19 21:28 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox