Thanks for all of your help. Unfortunately, it still does not work. It is really nightmare to use camp4 in a windows machine. I try to reinstall plain OCaml without using GODI, if the same error happens, I have to go back to Ubuntu. Thanks. Conglun On Mon, Oct 5, 2009 at 2:35 PM, Gerd Stolpmann wrote: > > > > While cygwin cannot load shared libraries from bytecode, it still can > load pure bytecode dynamically. It is reasonable that there is a > dynlink.cma for this case, and that camlp4lib.cma depends on it. > > findlib has a special mode for platforms that cannot load shared > libraries dynamically. This mode seems to be broken - it calls a script > safe_camlp4 instead of camlp4, and safe_camlp4 produces ad hoc a new > camlp4-type executable that includes the required C libraries - without > that trick you couldn't use json-static at all on these platforms: > > https://godirepo.camlcity.org/svn/lib-findlib/trunk/tools/safe_camlp4 > > The question is now whether the error is in this script (does it have to > add dynlink.cma anyway?) or whether mkcamlp4 is broken. > > Can you try to change safe_camlp4 so the line > > mkcamlp4 -o $tmp_camlp4 $cp4_mods || exit > > reads > > mkcamlp4 -o $tmp_camlp4 dynlink.cma $cp4_mods || exit > > ? (I don't have a cygwin ocaml at hand.) safe_camlp4 should be in the > bin/ directory. > > Gerd > -- > ------------------------------------------------------------ > Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany > gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de > Phone: +49-6151-153855 Fax: +49-6151-997714 > ------------------------------------------------------------ > >