Skip to content

Calling SML compiled with MLton from C #455

@klartext

Description

@klartext

I want to have a C program calling SML (used as library).
I looked at this:
http://www.mlton.org/CallingFromCToSML
but that is not, what I was looking for.

The example C code contains functions that call SML functions,
but there is no main() in the C file.

What I want to do is: have C functions including the main(), calling the SML-functions.
But my experiments to somehow achieve that did not work - multiple definition of main was one error I got.

Is it possible at all, to call the output of MLton like a static or shared library from a C program (including main())?

If it's possible: where can I find documentation on that?
If it is not possible, will that be possible one day? I would like to ask for that possibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions