Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
ocamlbuild - ocamlfind_query definition won't compile
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-06-04 (15:21)
From: Hugo Ferreira <hmf@i...>
Subject: ocamlbuild - ocamlfind_query definition won't compile

I have been looking at several examples that use ocamlfind to
add a library to the ocamlbuild process. An example is:

let ocamlfind_query pkg =
  let cmd = Printf.sprintf "ocamlfind query %s" (Filename.quote pkg) in
  My_unix.run_and_open cmd (fun ic ->
    Log.dprintf 5 "Getting Ocaml directory from command %s" cmd;
    input_line ic)

However I get the following error:

Error: This expression has type string but an expression was expected of 
          'a -> 'b -> 'c

I am using version 3.11.2. Can anyone tell me what I'm making the error?

Hugo F.