users-prolog
[Top][All Lists]
Advanced

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

Re: question and bug report for gprolog 1.2.14


From: Erick Alphonse
Subject: Re: question and bug report for gprolog 1.2.14
Date: Tue, 10 Sep 2002 23:05:06 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

  > 1) I cannot link external predicates written C++ and gprolog 1.2.14
  > under Mandrakelinux 8.2 (and I can with gprolog 1.2.9 or when rewriting
> the external predicates in C). Does someone experience the same problem?

Hello,

Actually, the problem is getting serious for me because I tried to compile the program below with "gplc --c-compiler g++ -L '-lstdc++' test.pl pred1.cpp pred2.cpp" under gprolog 1.2.14, 1.2.13, 1.2.12, and I get :

/tmp/gplckYaoec.o(.bss+0x0): multiple definition of `last_read_line'
/tmp/gplcXiDz6a.o(.bss+0x0): first defined here
/tmp/gplckYaoec.o(.bss+0x4): multiple definition of `last_read_col'
/tmp/gplcXiDz6a.o(.bss+0x4): first defined here
/tmp/gplckYaoec.o(.bss+0x8): multiple definition of `byte_code'
/tmp/gplcXiDz6a.o(.bss+0x8): first defined here
collect2: ld returned 1 exit status
compilation failed

and that on two different computers with mandrake 8.1 and mandrake 8.2. (x86 version). It compiles with gprolog 1.2.9 but I need a version greater or equal to 1.2.12 (because of the patches). Could someone be so kind as to try and compile the program? Like that, I will get a better idea where the problem comes from.

Thanks very much in advance,
Regards,
Erick.

  > test.pl
  > :- foreign(pred1(+term),[return(boolean)]).
  > :- foreign(pred2(+term),[return(boolean)]).
  >
  > pred1.cpp
  > #include "gprolog.h"
  >
  > extern "C"
  > int pred1(PlTerm p) {
  >   return true;
  > }
  >
  > pred2.cpp
  > #include "gprolog.h"
  >
  > extern "C"
  > int pred2(PlTerm p) {
  >   return true;
  > }








reply via email to

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