Re: [Logtalk] GNU prolog/Logtalk

Paulo Moura <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
On 14/jul/2004, at 16:52, Saurabh Bhatla wrote:

> Hi all,
>    I have just started working in logtalk today. I am using it with GNU
> Prolog. I want to make an executable for birds example. I am using the
> following command to generate the executable.
>
> gplc *.pl ../../compiler/logtalk.pl ../../configs/gnu.pl
>
>
> I get the following error:
>
> [saurabh@emachine1 birds]$ gplc *.pl ../../compiler/logtalk.pl
> ../../configs/gnu.pl
> /tmp/gplcUg8BDb.o(.text+0x1bb): In function `Lpred3_3':
> : undefined reference to `predicate($proto_hierarchy0__dcl/5)'
> /tmp/gplcUg8BDb.o(.text+0x2b9): In function `Lpred5_3':
> : undefined reference to `predicate($proto_hierarchy0__def/5)'
> collect2: ld returned 1 exit status
> compilation failed

See the NOTES and SCRIPT file on the examples/birds directory. 
Specifically, the birds examples have dependencies on library entities. 
In order to create an executable, you will need to compile all the 
Prolog files generated by Logtalk, including the library ones. From the 
birds directory, you should be able to get an executable by doing 
something like:

[saurabh@emachine1 birds]$ gplc ../../configs/gnu.pl 
../../compiler/logtalk.pl ../../library/*.pl *.pl

I belief that gplc accepts an option for choosing a startup goal, which 
could be handy.

Hope this helps. Cheers,

Paulo


-----------------------------------------------------------
Paulo Jorge Lopes de Moura
Dep. of Informatics                   Office 4.3  Ext. 3257
University of Beira Interior          Phone: +351 275319700
6201-001 Covilhã                      Fax:   +351 275319891
Portugal

<mailto:[email protected]>
<http://www.di.ubi.pt/~pmoura>     <http://www.logtalk.org>
-----------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.