Prolog not fully initialized

"Michał Bieliński" <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
Greetings!

I recently managed to interface GNU Prolog with Free Pascal albeit not
fully. Both Prolog and Pascal units compile and link.

Pl_Start_Prolog executes and returns. Manual states this function will
collect all objects and initialize them. Probably this somehow fails
because many standard atoms are not found by Pl_Find_Atom function. It
seems linking through gcc allows Prolog to find all objects but using
another compiler does not.

Another thing I tried was to stop fpc just before linking and fed
resulting link.res file to "gcc -nostdlib". Did not help.

I would be very grateful for pointers how to deal with this problem.

Below is some information you might find useful:
uname -mosrv:
Linux 2.6.35-ARCH #1 SMP PREEMPT Fri Aug 27 16:22:18 UTC 2010 i686 GNU/Linux

Pascal source: http://pastie.org/1187257
Prolog source is new_main.pl from GNU Prolog examples.
Program output: http://pastie.org/1187266

-- 
Michal Bielinski
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.