简体   繁体   中英

Make OcaIDE work in Eclipse on Mac

After days of trying to get this to work on my own, I had to stop wasting time and finally ask for help. I run Mavericks on my iMac. I have installed Eclipse[Version: Kepler Service Release 1] and the OcaIDE plugin. All my paths are filled in by default except ocamlbuild , omake and Ocamle lib Path . So I was thinking I have done everything needed to finally get Ocaml to compile my programs and get me the results I get in the Terminal.

I created a new Ocaml Managed Project, then a new file with extension file.ml and typed:

List.fold_left
(fun acc x -> acc + x)
0
[1; 2; 3; 4];;

In the terminal, I get what I expect: - : int = 10 But in Eclipse, in the error tab, I get org.eclipse.e4.ui.workbench . I googled this but it looks to me there are so many things that could get this error show in the errors tab. I just need help fixing this so that when I select the code and click "Eval in Toplevel", I can get the code to produce something useful and not an error. I'd appreciate some help. Thank you.

You need to have the ocamlbuild and OCaml lib Path filled to run the code. The paths should fill up automatically, but sometime it didn't (I did face once and it's because the file permission problem, my OcalIDE can't read the ocaml bin. You may check on that as well)

You can check your ocaml path and fill up the unfilled path. For example, if ocaml is placed at /usr/local/bin/ocaml then ocamlbuild should be /usr/local/bin/ocamlbuild and OCaml lib path should be /usr/local/lib/ocaml

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM