Sublime Forum

Creating a build system for OCaml

#1

Hey all,
I am new to the Forums and to Sublime text, but I’m having difficulty making a build system for OCaml. I created a OCamlC.sublime-build file in the ~/Library/Application Support/Sublime Text 2/Packages/OCaml/ directory, and here is what I put into it:
{
“cmd”: “ocamlc”, “$file”],
“selector”: “source.ml”,
“working_dir”: “${project_path:${folder}}”
}
ocamlc is in my PATH variable, and the command works on a command line, but when I try to build in Sublime Text 2, it gives me the message on the console:
[Errno 2] No such file or directory
[Finished]

Any advice as to what I can do to fix this? Thanks for the advice.

0 Likes

Create a build system for ocaml
#2

Sublime may not be accessing the same path variable that your command line is. Type in “echo $PATH” in your command line and then copy the contents into your .sublime-build file under the key “path”.

0 Likes