[Top][All Lists]

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

Always the problem between gplc/gcc

From: bruno patin
Subject: Always the problem between gplc/gcc
Date: Tue, 20 Aug 2002 23:04:28 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530

This mail follow the one on the compilation of c program using gcc and not gplc. I try a test where there are three files. Two are prolog files and one a c file with a main defined and calls to the prolog engine.

When I compile using gplc for the three files, no problem it works (I have to try exceptions but ...). When I produce objects by gcc for the c file and gplc for the pl files and then link with gplc, it works

it doesn't work when using gcc for the link edit. At that point, The Find_Atom do not return the value of a functor but with using Create_Atom, no problem, I obtain the same value that with the exec that work. The problem arises when I call the Pl_Quer_Call. It crash in the Prepare_Call function of gprolog because the goal_H macro is not positionned, w pointer is NULL so the *w++ instruction send a SIGSEV signa (foreign_supp.c in Bips_Pl). Evidently, when it works goal_H is well positionned.

Here I'm lost because I do not know How gprolog works with the memory.

I thought that the thread on Raising Exceptions from C code would saved me but I tried to compile gprolog without the ebp support and my code with the -fomit-frame-pointer and it did not work either.

I can search a bit more inside the gprolog code but I don't know if it useful. Moreover, I only have to know what gplc do that gcc does not do to make my code work...

So, is someone willing to help me ?


ps : I work on a linux box with the gcc 2.95 and the gprolog 1.2.13

reply via email to

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