home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!goanna!ok
- From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe)
- Newsgroups: comp.lang.prolog
- Subject: Re: Time and Date in Quintus P.
- Message-ID: <14399@goanna.cs.rmit.oz.au>
- Date: 8 Sep 92 04:42:23 GMT
- References: <1992Sep3.201023.6191@tom.rz.uni-passau.de> <1992Sep4.185308.12558@tom.rz.uni-passau.de>
- Organization: Comp Sci, RMIT, Melbourne, Australia
- Lines: 47
-
- In article <1992Sep4.185308.12558@tom.rz.uni-passau.de>, baier@forwiss.uni-passau.de (Joern Baier) writes:
- : gandalf:~/prolog/dp 104> prolog
- : | ?- [library(date)].
- : [consulting /private/projects/quintus/generic/qplib2.5.1/library/date.pl...]
- : [consulting /private/projects/quintus/generic/qplib2.5.1/library/errno.pl...]
- : [errno.pl consulted in module errno 0.500 sec 11,884 bytes]
- : ld:
- : Undefined:
- : gmtime
- : localtime
- : [ERROR: Foreign interface, call to Unix "ld" failed (error 413)]
- : [Loading of foreign files NOT completed]
- : [date.pl consulted in module date 1.333 sec 22,508 bytes]
- :
- You have a serious problem there, because gmtime() and localtime() are
- UNIX library functions. More than that, they are required by the ANSI
- C standard. The linker should have found them. You will need to check
- that QP has been installed correctly, and especially to verify that ld
- is being called with the correct command-line arguments.
-
- : ----------------------------------------------------------------------
- : gandalf:~/prolog/dp/date 111> gcc date.c
-
- You do not want a complete program. You want a ".o" (object, linkable)
- file. For that, the correct command is
- gcc -c date.c
- ^^
- : date.c: In function `QD4mat':
- : date.c:358: warning: suggest parentheses around && within ||
- Sheesh. Does it also say "suggest parentheses around * within +"?
- Ignore that message.
- : ld:
- : Undefined:
- : main
- : QP_atom_from_string
- : collect: /usr/bin/ld returned 1 exit status
-
- : It seems that 'QP_atom_from_string' is not defined.
-
- Yes it is. It is defined in the Quintus Prolog system itself.
- The *.c files in the library area are _not_ meant to be compiled as
- separate programs, but as ".o" files which will later be linked with
- the Prolog system (either statically, if you so choose when using qpc,
- or dynamically, if you use load_foreign_files). Just add the "-c" option.
-
- --
- You can lie with statistics ... but not to a statistician.
-