From: karl@grebyn.com (Karl A. Nyberg)
Subject: Unix (HP-UX) system calls from ADA
Date: 20 Mar 90 21:22:39 GMT [thread overview]
Message-ID: <19481@grebyn.com> (raw)
In-Reply-To: 1587@krafla.rhi.hi.is
In article <1587@krafla.rhi.hi.is> valdi@rhi.hi.is (Thorvaldur Sigurdsson) writes:
%Problem : Making unix system calls within Ada code
%Background : HP-UX 6.5, HP 9000/300 series, Alsys 4.35 Ada compiler
%Error message :
% ld: Undefined external -
% _ll
% _clear
% ld: output file still contains undefined symbols
% ld: (Warning) did not generate an output file
% ada: Errors detected
%
% "When you want to call an HP-UX system call from Ada
% code, you should use a pragma INTERFACE with C as the
% language name. It is not necassary to provide the C
% object file to the binder, because it will be found
% automatically when the linker searches the system
% library".
%
%Question : Is the manual wrong concerning automatic linking or
% am I doing something wrong in the code ?
%
My guess is you are trying to use not SYSTEM calls, but calls to units in
some particular libraries (e.g. curses?). In those cases, you will need to
include the C object file to the binder (possibly the archive file?) to
resolve those names.
Or, are you trying to use the shell commands "clear" and "ls -l"? In which
case you're asking an entirely different set of questions, for which the
answer is a convoluted use of either the "system" call (if it exists on your
machine) or getting an interface to fork and/or exec.
-- Karl --
next prev parent reply other threads:[~1990-03-20 21:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1990-03-20 15:57 Unix (HP-UX) system calls from ADA Thorvaldur Sigurdsson
1990-03-20 21:22 ` Karl A. Nyberg [this message]
1990-03-21 17:09 ` Andy DeFaria
1990-03-21 18:46 ` Andy DeFaria
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox