users-prolog
[Top][All Lists]
Advanced

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

Re: Prolog and C code works on PowerPC, fails on Intel


From: Daniel Diaz
Subject: Re: Prolog and C code works on PowerPC, fails on Intel
Date: Mon, 17 Feb 2003 12:20:37 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01

You dont give us enough information (which version do you use ?). However I suspect you dont use a wrapper to invoke the main() function. Last versions of GNU-Prolog need this. You have to invoke Start_Prolog() in another function than main(). So your main() calls an auxiliary function which invokes Start_Prolog().

You can find an example at:
http://gnu-prolog.inria.fr/manual/manual070.html

Good luck !


Miguel Arroz wrote:
Hi!

  I'm working on a project on Linux for PowerPC. I have a prolog file
linked with a (really big) project in C. It works perfectly on my PowerPC
machine.

  When I move it to an Intel machine, it fails on the first C call to
prolog. I do it like on the example on page 204 of the manual. First, I
call Start_Prolog, then Find_Atom (and it returns a positive int, not -1,
so it whould be working fine). Then, Pl_Query_Call. Here's the problem: it
returns an exception.

  First, how can I print that exception, to know what's happening? I
tried to read the PlTerm as String, but it fails and crashes.

  Second, why is this happening? When I test the example on that page on
the Intel machine, it works. It does not work on my project, but the C
code is mostly the same on the two machines...

  Yours

Miguel Arroz



                                       "Eles nao sabem nem sonham..."

        Miguel Barreto da Silva Arroz - IST, LEIC - address@hidden
          ** Guia Macintosh em Portugal - http://www.guiamac.com **
            Homepage: http://www.geocities.com/SiliconValley/3232




_______________________________________________
Users-prolog mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/users-prolog

--
Ce message a subi une analyse antivirus par MailScanner ; il est vraisemblablement
sans danger.






--
Ce message a subi une analyse antivirus par MailScanner ; il est vraisemblablement
sans danger.





reply via email to

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