Questions tagged [ocamlbuild]

OCamlbuild is a generic build tool, that has built-in rules for building OCaml library and programs.

OCamlbuild is a generic build tool, that has built-in rules for building library and programs.

Useful resources

160 questions
3
votes
2 answers

Cygwin & OCaml: OPAM + Batteries

I extensively use Cygwin on a Windows 8 environment (I do not want to go ahead and boot/load Linux directly on the machine). I use the OCamlIDE plug-in for Eclipse and have experienced relatively no problems using this workflow setup. However, I…
9codeMan9
  • 802
  • 6
  • 11
  • 25
3
votes
1 answer

Ocamlbuild override the default options

My installation of OCaml does not recognize #!, therefore camlp4o cannot be ran standalone. It must be invoked as "ocamlrun camlp4o". I try to add a flag in the plugin. But the new flag is simply added to the existing flag. The result is that…
Zhi Han
  • 133
  • 1
  • 7
3
votes
1 answer

Build native executable with profile information using Ocamlbuild

How to build with enabled profile information using Ocamlbuild? It seems -p doesn't work there. Now, I use ocamlopt for this. For example, $ ocamlfind ocamlopt -c -p -thread -package core test.ml $ ocamlfind ocamlopt -p -o test -thread -package core…
Stas
  • 11,571
  • 9
  • 40
  • 58
3
votes
1 answer

Compilation error in ocamlgraph

I am trying to install ocamlgraph as a requirement for frama-c. When I am installing ocamlgraph and run make, I am getting the following compilation errors: ocamlopt.opt -c -I src -I lib -for-pack Graph src/delaunay.ml /tmp/camlasmc2c286.s:…
3
votes
1 answer

Passing options to camlp4 with ocamlbuild

I'm using ocamlbuild's native support for ocamlfind to simplify my project's build process. File foo.ml relies on conditional compilation using camlp4's macros. The _tags file contains the following: : package(camlp4.macro),…
Jon Smark
  • 2,528
  • 24
  • 31
2
votes
1 answer

Include package batteries in makefile for Ocaml

I would like to use functions of module List of Ocaml Batteries. I have installed Batteries, and a trivial code from Getting started works with ocamlfind ocamlc -package batteries -linkpkg euler001.ml -o euler001. Now coming back to my project, I…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
2
votes
0 answers

How to draw transparent background image with Camlimages and Graphics

Yesterday I included all the modules of Camlimages Package into my project, I successfully draw images in my graphical window, but the png images (with transparent background) are not drawn with transparent background. I will show you the image I…
2
votes
1 answer

OcaIDE doesn't see JoCaml tools

I'm having a problem while using OcaIDE in ocamlbuild mode. I'm trying to compile my own JoCaml sources. According to the JoCaml manual (bottom of page), to use ocamlbuild with JoCaml, I just need to add the -use-jocaml argument to ocamlbuild.…
Surikator
  • 1,463
  • 9
  • 26
2
votes
1 answer

Attribute 'explicit_arity' was not used

I'm trying to program using Jane Street's Core standard library and the Reason language frontend. So I took the corebuild script and saved a copy as recorebuild by replacing ocamlbuild with rebuild. But I'm having trouble with some simple code. This…
Tobia
  • 17,856
  • 6
  • 74
  • 93
2
votes
1 answer

OCaml Makefile: No Rule to Make Target

I'm following this OCamlbuild example, and accordingly have created the Makefile below: OCB_FLAGS = -use-ocamlfind -I src -I lib OCB = ocamlbuild $(OCB_FLAGS) check: ocamlfind query core async clean: $(OCB) -clean byte: $(OCB) main.byte native:…
Ari
  • 4,121
  • 8
  • 40
  • 56
2
votes
1 answer

Using ocamlmktop with ocamlbuild

I have a project that builds successfully using ocamlbuild. However, I would also like an easy way to interact with the project's individual functions from different modules via the toplevel but my attempts at using ocamlmktop haven't worked out as…
SaxSalute
  • 349
  • 2
  • 8
2
votes
2 answers

Single OCaml module causes inconsistent assumptions about interface

Here is my ocamlbuild-based project structure: _tags.ml: true: package(batteries) Main.mlpack Stream Main/Stream.ml module MyStream = BatStream I am trying to compile the Main module using ocamlbuild -use-ocamlfind Main.cmo The error message…
Ken Wayne VanderLinde
  • 18,915
  • 3
  • 47
  • 72
2
votes
1 answer

Error: The module List is an alias for module ListLabels, which is missing

Something is wrong with my build setup. I'm getting this error: Error: The module List is an alias for module ListLabels, which is missing In the interactive top-level ListLabels exists, but not during compilation. I tracked this error message to…
Vladimir Keleshev
  • 13,753
  • 17
  • 64
  • 93
2
votes
2 answers

How to use Menhir error messages generation via OCamlbuild?

I am using the --compile-errors functionality of menhir and I'm quite happy with it. I'm also using ocamlbuild to manage the compilation of my project. Since the project is quite basic, the build infrastructure has remained trivial so far. I have a…
Abdallah
  • 335
  • 1
  • 7
2
votes
1 answer

OCaml warning 31, compiler-libs, and ppx

I'm porting my application from OCaml 4.02.3 to 4.03.0. Say you have the following in lexer.ml: type t = T [@@deriving sexp] let () = sexp_of_t |> ignore; print_endline "hai" I'm trying to run it as following: ocamlbuild -use-ocamlfind -pkg…
Vladimir Keleshev
  • 13,753
  • 17
  • 64
  • 93