Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 521

Writing a wrapper stub to something dynamic, where static linking would produce huge executables?

$
0
0

What I have:

  • dune
  • opam
  • opencv (headers in /usr/include, and shared objects)
  • a cxx stub
  • main project in ocaml

What I want:

  • to build the project with dune

The problem:
I can’t seem to find in dune docs the way to get this setup working. The compiler rightfully complains at the linking stage saying that all my opencv-related references in the object file are undefined.
As far as I am aware, OCaml only links statically (will have to use dlopen wrappers otherwise), but I was wondering if it’s possible to link dynamically with the stub compiler then feed the object file to OCaml compiler…

What’s the tried and true way to approach this situation anyway?

11 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 521

Trending Articles