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
0
votes
2 answers

Using ocamlc to compile libraries independently

I have three files: $ ls lib.ml desk.ml test.ml $ cat lib.ml let myfunction () = print_endline "Hello world" $ cat desk.ml module Liberty = Lib $ cat test.ml Desk.Liberty.myfunction () I want to compile a desk.cma that does not expose the…
Kites
  • 1,098
  • 9
  • 21
0
votes
1 answer

Installing Ocamlbuild

I have opam version 1.2.2 and ocaml version 4.03.0. Trying opam update -u or opam install mirage gives output where the first error is: [ERROR] The compilation of ocamlbuild failed at "make -f configure.make all …
Joseph Johnston
  • 533
  • 1
  • 3
  • 14
0
votes
1 answer

Ocamlbuild can't find Ocamlbuild_js_of_ocaml cmx file

I'm starting an web development project and was hoping to use Js_of_ocaml. However, when attempting to use OCamlbuild as my build tool, I've encountered the following error: Warning 58: no cmx file was found in path for module…
superlizardmo
  • 333
  • 1
  • 11
0
votes
1 answer

Undefined module when using Oasis to build an OCaml project

It's me, again.. I am working on an OCaml project and I would like to use Oasis to build the whole code base. Here is how my codebase is organized. src/ core/ init.ml type.ml utils.ml plugin/ main.ml I firstly only…
lllllllllllll
  • 8,519
  • 9
  • 45
  • 80
0
votes
1 answer

OCaml: using Oasis with multiple-level src folders

I am trying to use oasis to compile my project, and my project is organized in this way: _oasis src/ main.ml core_a.ml core_b.ml type.ml plugins/ plugin_a.ml plugin_b.ml Note that in the plugin_a.ml, it refers…
lllllllllllll
  • 8,519
  • 9
  • 45
  • 80
0
votes
1 answer

OASIS "Selective" Unbound module error for an internal module

I try to compile a small OCaml [4.03.0+flambda] project using Oasis. I have four modules, three declared in Modules field and one using InternalModules. My _oasis configuration file is there. The internal module is named Infix, and contains a…
yago
  • 171
  • 7
0
votes
1 answer

Understanding Oasis findlibParent's purpose

I am currently working on a project where I am using Oasis to handling building of the OCaml files. It works great. However I am confused at what findlibParent is actually doing in a library definition. The documentation specifies FindlibParent:…
user6467981
0
votes
1 answer

LLVM tutorial OCaml Compilation Assembler Error

I have been working through the LLVM Kaleidoscope Tutorial for OCaml. On the third part of the tutorial, I have navigated to the example code in the folder OCaml-Kaleidoscope\Chapter3 I am encountering an issue when compiling with ocamlbuild…
0
votes
1 answer

LLVM tutorial OCaml Compilation Error

I have been working through the LLVM Kaleidoscope Tutorial for OCaml. On the second part of the tutorial, I have navigated to the example code in the folder OCaml-Kaleidoscope\Chapter2 I am encountering an issue when compiling with ocamlbuild…
0
votes
1 answer

How do I link two custom OCaml modules with `corebuild`

I have two OCaml modules, namely nhc.ml and test.ml. Both of these modules reference parser.mly, scanner.mll and ast.mli. The goal is to have one executable, namely nhc.native, where I can still reference the functions of test.ml. ./nhc.native…
Abundance
  • 1,963
  • 3
  • 24
  • 46
0
votes
2 answers

How to compile a jocaml file with ocamlbuild and include a package?

How can I compile a jocaml source file which needs the cryptokit package (successfully compiled with the companion ocaml) with the ocamlbuild tool? When I execute the command ocamlbuild -pkg cryptokit -use-jocaml a.native I get this error: Warning:…
Lapinot
  • 1,305
  • 2
  • 9
  • 11
0
votes
1 answer

How to prevent warnings ocamlbuild/oasis warnings?

I'm using OCaml, and Oasis to generate the appropriate input to ocamlbuild. Very straightforward question here - every time I go to compile my software with ocaml setup.ml -build I get these warnings: W: Cannot get variable ext_obj W: Cannot get…
Adam Miller
  • 1,756
  • 1
  • 25
  • 44
0
votes
1 answer

Ocamlbuild doesn't take in account the included folders

I am trying to use ocamlbuild to build my project. It needs to take into account an external library (also compiled with ocamlbuild) that contains in the folder myfolder/ the following files (myfolder is a symlink to the good library that I create…
tobiasBora
  • 1,542
  • 14
  • 23
0
votes
2 answers

passing multiple statements in ocaml using "in" and "and" operations

I wanted to convert this C++ code to ocaml, but i'm getting syntax error C++ code int** matrix(int n,int **a,int**b) { t=n/2; a11=new int*[t]; for(i=0;i
lijo050
  • 233
  • 4
  • 14
0
votes
1 answer

OCamlbuild not resolving subdirectory dependency

I have an OCaml project and I'm running into a weird issue. The directory structure looks like this: ./tests test.ml templatetest.ml ./src template.ml ... andsoforth.ml I am building it like this: ocamlbuild -Is src,tests…
eatonphil
  • 13,115
  • 27
  • 76
  • 133
1 2 3
10
11