13955Re: "ocaml_beginners":: OASIS help: can't build project that depends on core
- Sep 7, 2013View SourceNo wonder why I keep getting the same error! I totally misunderstood the differences between toplevel and file compilation. Thanks for pointing it out~Now the building process is working just fine!2013/9/8 Philippe Veber <philippe.veber@...>Hi,
There is indeed no Expr.Table module in your project. However there is an Expr.Expr.Table one :o)
When you compile a file name foo.ml, this automatically defines a module named Foo. If you start the file foo.ml with module Foo = struct ... end, you're defining a submodule Foo of the module Foo. Let's see that on an example:
let a = 1
module Foo = struct
let b = 41
let c = Foo.a + Foo.Foo.b
Please refer to the manual  for a more thorough explanation, and do not hesitate to ask again if things are not clear yet.
2013/9/6 Chingfan Tsou <caojingfan@...>Yes, of course. Sorry that I thought it would be enough to solve this just with my description.here it is, and thank you very much!2013/9/6 Gabriel Scherer <gabriel.scherer@...>It's hard to help you without a reproducible setting to test. Could you send somewhere a zip of your project (or a reduced version thereof that reproduces the issue)?On Thu, Sep 5, 2013 at 4:30 PM, Chingfan Tsou <caojingfan@...> wrote:I just figured it may be useful if I learned how to use oasis. Sadly it turns out that it can be pretty challenge :(I tried with the command "ocamlbuild -lib expr.cmo autmt.native" just now but still got the same error. Was I doing this right?2013/9/5 Hongbo Zhang <hongboz@...>OCamlbuild would sufficeHi,For toy projects, there's no need to use oasis.--On Thu, Sep 5, 2013 at 9:50 AM, Chingfan Tsou <caojingfan@...> wrote:Hi~again I ran into troubles with this little project and I was hoping anyone could help me out. Thanks in advance.Currently there are 3 files (described in the first mail) in this little project and one depends on the other like this:rep.cmo : expr.cmo autmt.cmorep.cmx : expr.cmx autmt.cmxautmt.cmo : expr.cmoautmt.cmx : expr.cmxexpr.ml doesn't have the kind of inside-project dependencies.The problem is expr.ml has internal modules like Expr.Table and is referenced in autmt.ml.I tried this command 'ocamlfind ocamlc -c -package core -thread expr.cmo -o autmt.cmo autmt.ml' but failed withFile "autmt.ml", line 8, characters 17-34:Error: Unbound module Expr.TableSo could anyone tell me what exactly should the build command be and what am I supposed to do with the _oasis file so that oasis can work properly? Thanks a lot!
-- Regards, Hongbo