[m-users.] Guile/GTK

Tomas By tomas at basun.net
Thu Sep 4 08:54:41 AEST 2014


Hi all,

While it seems to work so far to link Guile and GTK with Mercury as the
top level, I'd prefer to write the entire GUI in Scheme, not C. Attached
is a minimal example of this approach.

I initialise Guile, de-displace the registers, and start a shell. Then I
try to load the Guile GTK module, and get a seg fault:


|$ ./gui nofile
|guile> (use-modules (gnome-2))
|guile> (use-modules (gnome gtk))
|
|*** Mercury runtime: caught segmentation violation ***
|PC at signal: -1218458559 (b75fcc41)
|address involved: 0x5
|This may have been caused by a stack overflow, due to unbounded recursion.
|exiting from signal handler
|Segmentation fault (core dumped)


If anybody has any idea why this happens, I'd be glad to hear.

Alternatively, if somebody could post an example of linking Mercury &
Guile with C as the top level, that could be useful also.

Thanks in advance for any help.

/Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gui.m
Type: text/x-objcsrc
Size: 1419 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/users/attachments/20140904/2bec77a6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 477 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/users/attachments/20140904/2bec77a6/attachment.obj>


More information about the users mailing list