users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about compiling of files lgt, pl and c++


From: CARLOS EGEA
Subject: Re: Question about compiling of files lgt, pl and c++
Date: Mon, 17 Feb 2003 16:04:34 +0100 (CET)

 --- Paulo Moura <address@hidden> escribió: > 
> On Sexta, Fev 14, 2003, at 18:39 Europe/Lisbon,
> CARLOS EGEA wrote:
> 
> > I am trying to compile three types of different
> files
> > that they are.
> >
> >   lgt. Logtalk Files
> >   pl.  Prolog Files.
> >   cc.  C++ Files.
> > ...
> > When I try to compile, with the command
> >  gplc --c-compiler g++ list.lgt ex.pl examp.pl
> > client.cc
> >
> > The output gives an error.
> 
> Logtalk source files must be compiled by Logtalk. In
> this case, 
> compiling "list.lgt" will produce a Prolog code file
> named "list.pl" 
> that can be further compiled with gplc. However, you
> also need to 
> compile the Logtalk configuration file for GNU
> Prolog and the Logtalk 
> preprocessor and runtime (contained in the file
> compiler/logtalk.pl in 
> the current Logtalk distribution).
> 
> 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:address@hidden>
> <http://www.logtalk.org/pmoura.html>
>
-----------------------------------------------------------
>  Hi Paulo,

I have a problem when I want to link two files, a lgt
file and a pl file. For instance.

list.lgt

:-object(list).

   :-public(member/2).
   :-public(ocu/3).
 
    member(Element,[Element|_]).
    member(Element,[_|List]):-
       member(Element,List).
    ocu(X,Y,Z):-ocurrencia(X,Y,Z). 
:-end_object.


pru.pl

ocurrencia(X,Y,Z):-Z is X+Y.


But If I have the next, it goes well.

list.lgt

:-object(list).

   :-public(member/2).
   :-public(ocu/3).
 
    member(Element,[Element|_]).
    member(Element,[_|List]):-
       member(Element,List).
    ocu(X,Y,Z):-append(X,Y,Z). 
:-end_object.

append is un built-in predicate, but It is defines in
other file and it goes well.

Can you help me????

Thanks in advance. 







___________________________________________________
Yahoo! Móviles
Personaliza tu móvil con tu logo y melodía favorito 
en http://moviles.yahoo.es




reply via email to

[Prev in Thread] Current Thread [Next in Thread]