Skip to content

How to generate a shared libray from C and ML code? #267

@cogumbreiro

Description

@cogumbreiro

Hi, everyone,

I am a bit confused when trying to generate a dynamic library (shared object).

I expected this to be done by creating a .clib file listing the object files (one per line).
When I do ocamlbuild libproj.so I get the following error message:

Backtrace:
                      - Failed to build the target lib/libproj.so
                          - Building lib/libproj.so:
                              - Failed to build all of these:
                                  - Building lib/libproj.cmxa:
                                      - Failed to build all of these:
                                          - Building lib/libproj.cmx:
                                              - Failed to build all of these:
                                                  - Building lib/libproj.ml:
                                                      - Failed to build all of these:
                                                          - Building lib/libproj.mly
                                                          - Building lib/libproj.mll
                                                  - Building lib/libproj.mlpack
                                          - Building lib/libproj.mllib
                                  - Building lib/libproj.mldylib

Should I be generating a shared library with a .clib file? Any help on what I am missing?

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