From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.lang.ada:3505 comp.sys.hp:4637 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!pyrdc!grebyn!karl From: karl@grebyn.com (Karl A. Nyberg) Newsgroups: comp.lang.ada,comp.sys.hp Subject: Unix (HP-UX) system calls from ADA Message-ID: <19481@grebyn.com> Date: 20 Mar 90 21:22:39 GMT References: <1587@krafla.rhi.hi.is> Sender: karl@grebyn.com Followup-To: comp.lang.ada Organization: Grebyn Corp. Distribution: List-Id: 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 --