ocamlbuild

ocamlbuild; building toplevel

只谈情不闲聊 提交于 2019-12-06 11:49:34
问题 Having successfully reorganized my project for ocamlbuild with subdirectories and using ocamlfind, I've found it difficult to build the top-level. I've constructed a .mltop file containing all the modules that would be included and added the packages to the _tags , but the build doesn't work. It cannot find the C functions that are compiled with one of the modules. With -classic-display on, I can see that file, libcside.a , not being included and isn't even being compiled at all! The c file

OCaml warning 31, compiler-libs, and ppx

不打扰是莪最后的温柔 提交于 2019-12-06 07:18:58
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 ppx_sexp_conv -cflags '-w @a-4-31' lexer.byte -- But I'm getting the following error: Warning 31: files lexer.cmo and /Users/vladimir/.opam/4.03.0+flambda/lib/ocaml/compiler-libs/ocamlcommon.cma(Lexer) both define a module named Lexer File "_none_", line 1: Error: Some fatal warnings were triggered (1 occurrences) I understand that compiler-libs has a

How to use -thread compiler flag with ocamlbuild?

南楼画角 提交于 2019-12-04 15:48:54
问题 I am using Jane Street 's async_core by adding package(async_core) in _tags . When I use ocamlbuild -use-ocamlfind -I src test/test_airport.native , it gives me the following error: camlfind ocamlopt -linkpkg -package async_core -package unix -package netclient -package mongo -package xml-light src/airport.cmx test/test_airport.cmx -o test/test_airport.native ocamlfind: Error from package `threads': Missing -thread or -vmthread switch I googled it and here is what I got http://caml.inria.fr

Properly compiling modules in subfolders (ocamlbuild)

为君一笑 提交于 2019-12-03 12:07:38
I recently decided to organize the files in my project directory. I moved the parsers I had for a few different file types into their own directory and also decided to use ocamlbuild (the as the project was getting more complicated and the simple shell script was not sufficient any longer). I was able to successfully include external projects by modifying myocamlbuild with some basic rules (calling ocaml_lib , I'll use ocamlfind some other time), but I am stuck on how to include the folder as a module into the project properly. I created a parser.mlpack file and filled it with the proper

How to use -thread compiler flag with ocamlbuild?

做~自己de王妃 提交于 2019-12-03 09:53:03
I am using Jane Street 's async_core by adding package(async_core) in _tags . When I use ocamlbuild -use-ocamlfind -I src test/test_airport.native , it gives me the following error: camlfind ocamlopt -linkpkg -package async_core -package unix -package netclient -package mongo -package xml-light src/airport.cmx test/test_airport.cmx -o test/test_airport.native ocamlfind: Error from package `threads': Missing -thread or -vmthread switch I googled it and here is what I got http://caml.inria.fr/pub/docs/manual-ocaml-4.00/manual039.html It says: Programs that use system threads must be linked as