[Caml-list] Dynlink and ocamlfind for camlp4 3.11?

2009-10-04 Thread Conglun Yao
Dear all, I have tried to use json-static in OCaml 3.11, but met the annoying problem: Reference to undefined global `Dynlink' As Camlp4 3.11 requires explicit load of dynlink, so I tried ocamlfind ocamlc -package dynlink, json-static -syntax camlp4o -o

[Caml-list] Re: Dynlink and ocamlfind for camlp4 3.11?

2009-10-04 Thread Conglun Yao
On Sun, Oct 4, 2009 at 3:22 PM, Conglun Yao yaocong...@gmail.com wrote: Dear all, I have tried to use json-static in OCaml 3.11, but met the annoying problem: Reference to undefined global `Dynlink' As Camlp4 3.11 requires explicit load of dynlink, so I tried

[Caml-list] camlp4 + array

2009-10-04 Thread Anastasia Gornostaeva
Hello. The code let pl = Array.fold_left (fun ls l - :expr $ls$; $`int:l$ ) :expr some_array in :expr [| $pl$ |] produces somelike [| (1; 2; 3; 4) |], i.e the pl in () brackets. How should I do write this code properly? ermine

Re: [Caml-list] camlp4 + array

2009-10-04 Thread blue storm
I suppose you are using the classical syntax inside the quotations (camlp4oof). You can correct the misbehaviour by switching to the revised syntax inside the quotations (camlp4orf), but that may require some changes to your code elsewhere. I think the easier way to code that with the classical

Re: [Caml-list] Dynlink and ocamlfind for camlp4 3.11?

2009-10-04 Thread Richard Jones
On Sun, Oct 04, 2009 at 03:22:31PM +0100, Conglun Yao wrote: Dear all, I have tried to use json-static in OCaml 3.11, but met the annoying problem: Reference to undefined global `Dynlink' As Camlp4 3.11 requires explicit load of dynlink, so I tried

Re: [Caml-list] Dynlink and ocamlfind for camlp4 3.11?

2009-10-04 Thread Conglun Yao
Thanks, Rich. ocamlfind ocamlc -package dynlink,json-static -syntax camlp4o -c test.ml ocamlfind ocamlc -package dynlink,json-static -syntax camlp4o -c test.ml ocamlfind ocamlc -package 'dynlink,json-static' -syntax camlp4o -c test.ml But it still does not work. System: cygwin + OCaml 3.11.1

Re: [Caml-list] Dynlink and ocamlfind for camlp4 3.11?

2009-10-04 Thread Richard Jones
On Sun, Oct 04, 2009 at 08:32:17PM +0100, Conglun Yao wrote: Thanks, Rich. ocamlfind ocamlc -package dynlink,json-static -syntax camlp4o -c test.ml ocamlfind ocamlc -package dynlink,json-static -syntax camlp4o -c test.ml ocamlfind ocamlc -package 'dynlink,json-static' -syntax camlp4o -c

Re: [Caml-list] Dynlink and ocamlfind for camlp4 3.11?

2009-10-04 Thread Conglun Yao
In that case, try listing dynlink explicitly, like: ocamlfind ocamlc dynlink.cma -package json-static [etc] $ ocamlfind ocamlc dynlink.cma -package json-static -syntax camlp4o -c test.ml $ ocamlfind ocamlc -I /home/conglun/godi/lib/ocaml/pkg-lib/camlp4 dynlink.cma -package json-static

Re: [Caml-list] Dynlink and ocamlfind for camlp4 3.11?

2009-10-04 Thread Conglun Yao
On Sun, Oct 4, 2009 at 8:53 PM, Conglun Yao yaocong...@gmail.com wrote: In that case, try listing dynlink explicitly, like: ocamlfind ocamlc dynlink.cma -package json-static [etc] $ ocamlfind ocamlc dynlink.cma -package json-static -syntax camlp4o -c test.ml $ ocamlfind ocamlc -I

Re: [Caml-list] Dynlink and ocamlfind for camlp4 3.11?

2009-10-04 Thread Richard Jones
On Sun, Oct 04, 2009 at 08:53:50PM +0100, Conglun Yao wrote: $ ocamlfind ocamlc dynlink.cma -package json-static -syntax camlp4o -c test.ml $ ocamlfind ocamlc -I /home/conglun/godi/lib/ocaml/pkg-lib/camlp4 dynlink.cma -package json-static -syntax camlp4o -c t.ml Error: Error while

Re: [Caml-list] Dynlink and ocamlfind for camlp4 3.11?

2009-10-04 Thread Richard Jones
Ah but wait, your META file has that patch incorporated already! I don't know -- the cygwin distribution of OCaml is broken somehow. Rich. -- Richard Jones Red Hat ___ Caml-list mailing list. Subscription management:

Re: [Caml-list] Dynlink and ocamlfind for camlp4 3.11?

2009-10-04 Thread Conglun Yao
Thanks for all of your help. I tried, and it works fine until the require of json-static. It breaks when loading pcre.cma. Now we can say that pcre package has some problem, but dynlink is loaded successfully. Test1 $ ocaml Objective Caml version 3.11.1 # #load dynlink.cma;; # let x