Skip to content
Ocamlbuild helpers for C stubs
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src -I include dirs when linking cmxs too Nov 23, 2016
.ocamlinit nits Oct 30, 2016
_tags go Oct 26, 2016

ocb-stubblr — OCamlbuild plugin for C stubs


Do you get excited by C stubs? Do they sometimes make you swoon, and even faint, and in the end no cmxas get properly linked -- not to mention correct multi-lib support?

Do you wish that the things that excite you the most, would excite you just a little less? Then ocb-stubblr is just the library for you.

ocb-stubblr is about ten lines of code that you need to repeat over, over, over and over again if you are using ocamlbuild to build OCaml projects that contain C stubs -- now with 100% more lib!

It does what everyone wants to do with .clib files in their project directories. It can also clone the .clib and arrange for multiple compilations with different sets of discovered cflags.

ocb-stubblr is distributed under the ISC license.

Set it up


#require "ocb-stubblr.topkg"
open Ocb_stubblr_topkg

let () =
  Pkg.describe ~build:( ~cmd ()) ...

open Ocamlbuild_plugin

let () = dispatch Ocb_stubblr.init


depends: [
  "ocamlfind"   {build}
  "ocamlbuild"  {build}
  "topkg"       {build}
  "ocb-stubblr" {build}


Interfaces are documented. Online too.


Feel free to pitch in with ideas, especially if you have work-flows that are not, but could almost be supported.

Build Status

You can’t perform that action at this time.