[mercury-users] shared library

Marcus Vinicius Santos m3santos at scs.ryerson.ca
Sat Jan 17 04:02:24 AEDT 2004


Hi.

I would like to call mercury predicates from another language (Pliant,
for instance).

To test that, I have created the following simple mercury program:

:- module hello.
:- interface.
:- pred test is det.

:- implementation.

test.

And compiled this program as a shared library, as follows:

mmc --pic-reg -c hello.m
ml --make-shared-lib -o libhello.so hello.o

The Pliant compiler seems not able to find the predicate 'test' in the
shared library.

I tried to link a similar program in C (below), compiling it with gcc, and
it works. Pliant does find the function in the library and runs it.

void test(){}

Please advise.

Regards,

Marcus
-------------------------------------------------------------------
Marcus Vinicius Santos, Ph.D.     350 Victoria Street
Assistant Professor               Toronto, Ontario, M5B 2K3, CANADA
School of Computer Science        Phone: +1 416 979 5000 Ext: 7062
Ryerson University                http://www.scs.ryerson.ca/m3santos


--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list