comp.lang.ada
 help / color / mirror / Atom feed
From: CrsadrJoe@gnn.com (Joseph Fabian)
Subject: External C functions and ADA
Date: 1996/08/24
Date: 1996-08-24T00:00:00+00:00	[thread overview]
Message-ID: <4vocdh$c0j@news-e2c.gnn.com> (raw)


Hi.   For the last week I've been trying desperately to figure out how to 
call a simple user defined C function from within an ADA program, without 
the slightest bit of success I might add.  I'm using the Meridian compiler, 
which is an older ADA83 compliant program, because that happens to be the 
compiler of choice at the school I'll be attending next semester.  In a 
package spec, I'm declaring the subprogram like this:
 
  Procedure Clrscrn;
  Pragma Interface(C, Clrscrn);

This compiles beautifully.  Then I wrote the corresponding C function, 
compiled it and moved the object file to the ADA directory.  I then wrote a 
simple driver program to call the imported C function, which compiled fine 
also.  All that's left is to link it all together right ?  Well, that's 
where the bombs start dropping.  The link error "Unresolved Externals: 
_Clrscrn", has spent more time on my monitor than any code I've been 
writing lately.  All I can think is that the linker isn't finding the 
object code for the interface function.  Either I'm not putting it in the 
right directory, or I'm not naming the file correctly, or something.  This 
shouldn't be that difficult.  If anyone with experience in this area, or 
with the Meridian compiler itself, has any suggestions they'd be greatly 
appreciated.  I mean GREATLY appreciated !!          





             reply	other threads:[~1996-08-24  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-24  0:00 Joseph Fabian [this message]
1996-08-26  0:00 ` External C functions and ADA Jim Dorman
  -- strict thread matches above, loose matches on Subject: below --
1996-08-27  0:00 External C functions and Ada Mark Bell
1996-08-28  0:00 ` Arthur Evans Jr
replies disabled

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