From: valdi@rhi.hi.is (Thorvaldur Sigurdsson)
Subject: Unix (HP-UX) system calls from ADA
Date: 20 Mar 90 15:57:34 GMT [thread overview]
Message-ID: <1587@krafla.rhi.hi.is> (raw)
Subject: Unix (HP-UX) system call from ADA
Newsgroups: comp.sys.hp,comp.lang.ada
Keywords: ADA
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
Manual : Reference Manual for the Ada Programming Language,
Appendix F, page F-5, chapter F 1.1.4 Additional
Information on INTERFACE and INTERFACE_NAME :
"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 ?
Source code : main.ada, system.ads
main.ada : The following source is the main procedure
-- ************************************************
-- * ABSTRACT: Main program *
-- ************************************************
procedure MAIN is
begin
UNIX_SYSTEM_CALL.clear;
UNIX_SYSTEM_CALL.ll;
end MAIN;
system.ads : The following source is the unix_system_call package
-- ************************************************
-- * ABSTRACT: Package specification *
-- ************************************************
package UNIX_SYSTEM_CALL is
procedure clear;
procedure ll;
private
pragma INTERFACE (C, clear); -- clear display
pragma INTERFACE (C, ll); -- long list
end UNIX_SYSTEM_CALL; -- package specification
P.S. : I tried also implementing the usage of INTERFACE_NAME
without results.
------------------------------------------------------------------------
Thorvaldur Egill Sigurdsson |
Engineering Research Institute | Internet: valdi@kerfi.hi.is
University of ICELAND |
Hjardarhagi 2-6 | Phone: 354-1-694699
107 Reykjavik, ICELAND |
------------------------------------------------------------------------
next reply other threads:[~1990-03-20 15:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1990-03-20 15:57 Thorvaldur Sigurdsson [this message]
1990-03-20 21:22 ` Unix (HP-UX) system calls from ADA Karl A. Nyberg
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