Hello everyone, I’m a little stuck with
ocamlmklib… I’ve got a stub and a module and i want to produce a
.cma like that of
unix.cma etc… that means just the
.cma loaded in a repl should be enough (without needing to load any shared objects), but doing that seems to just not work.
It doesn’t seem like
unix loads any dlls, I made sure by removing
ocaml/stublibs entirely and it still worked. I tried to follow both the makefile in
otherlibs and this page in the manual and both still produced an executable that’s reliant on its respective shared object for loading stub functions. What am I doing wrong?
ocamlc -c test_stub.c
ocamlc -c test.ml
ocamlmklib -o test -custom test.cmo test_stub.o
I also tried with other variations like sprinkling
-ccopt -static everywhere and I still couldn’t produce a standalone
.cma no matter what.
I also asked the community channel on IRC, no one seems to notice anything off.
Some stuff that may be asked:
- I want
ocamloptseems to cause no linking problems. But
cmxas don’t work in the repl
- I want to use the library both in repl and in the project for loading in other modules