nbros / OcaIDE

An OCaml plug-in for Eclipse
www.algo-prog.info/ocaide/
37 stars 19 forks source link

opam installation with system compiler vs. path settings in OcaIDE #11

Open nilsbecker opened 11 years ago

nilsbecker commented 11 years ago

i'm using opam with the "system" compiler, in my case this is Ocaml 4.00.1 installed in /usr/local via homebrew. The ocaml standard library is in /usr/local/lib/ocaml, whereas several opam installed extra libraries are in ~/.opam/system/lib

in OcaIDE, i can only specify a single lib path (right?) there seems no way to pick up libraries from both locations for autocomplete etc...

izderadicka commented 10 years ago

Same question here - it would be nice if I can add additional libraries to auto-complete, ideally in same way that meaningfully integrates with OPAM

nyash commented 10 years ago

+1 @izderadicka Would love the same.

jiamo commented 10 years ago
(* Added by OPAM. *)
let () =
  try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
  with Not_found -> ()
;;
#use "topfind";;
#thread;;
#camlp4o;;
#require "core.top";;
#require "core.syntax";;

Can make ocaml work fine to use : open Core.Std While the toplevel in ocaIDE meet error : Cannot find file topfind

izderadicka commented 9 years ago

toplevel in OCAIde just needs to know correct env variables - if you start eclipse with this shell script it'll work:(replace path with correct directions on your system):

#!/bin/bash
# OPAM configuration
. /home/ivan/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
/opt/eclipse/eclipse $@ &