I switched my Prolog compiler from SWI Prolog 5.7.8 to GNU Prolog 1.3.1, as I would like to compile my Logtalk code to a (small) stand-alone executable. The Prolog source generated by logtalk_compile still depends on some internal Logtalk definitions, and I do not know what to do to resolve them. I am using Logtalk 2.37.0. What am I missing ?
Here is a transcript of what I did:
Code: Select all
nicolas@tamago:~/dev/example$ cat >> example.lgt <<EOF
> :- object( example ).
>
> :- initialization( go ).
>
> go :-
> write( 'Example\n' ).
>
> :- end_object.
> EOF
nicolas@tamago:~/dev/example$ gplgt
...
| ?- logtalk_compile( 'example' ).
% >>> compiling source file example...
% compiling object example... compiled
% >>> example source file compiled
% (0 warnings)
(4 ms) yes
| ?- halt.
nicolas@tamago:~/dev/example$ gplc --output example ./example.pl
/tmp/gplc0aBpAf.o: In function `directive_1':
(.text+0x475): undefined reference to `predicate($lgt_assert_runtime_clauses/1)'
collect2: ld returned 1 exit status
compilation failed
nicolas@tamago:~/dev/example$ find $LOGTALKHOME $LOGTALKUSER \( -type f -o -type l \) -exec grep -l lgt_assert_runtime_clauses {} \;
nicolas@tamago: ~/dev/example