caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Matej Košík" <5764c029b688c1c0d24a2e97cd764f@gmail.com>
To: Caml List <caml-list@inria.fr>
Subject: [Caml-list] ocamlfind + sexplib + bin_io
Date: Fri, 27 Apr 2012 19:21:15 +0100	[thread overview]
Message-ID: <4F9AE39B.8010500@gmail.com> (raw)

Hi,

I have decided to switch to ocamlfind.
All goes find but I have ran into a problem how to make "ocaml",
"sexplib" and "bin_io" play together.

Suppose that I have the following "program":

	type test = Foo | Bar
	with sexp, bin_io

when I try to compile it without ocamlfind:

	ocamlc -o main -pp "camlp4o -I ZZZ/lib/godi/lib/ocaml/pkg-lib/sexplib
-I ZZZ/lib/godi/lib/ocaml/pkg-lib/type-conv -I
ZZZ/lib/godi/lib/ocaml/pkg-lib/bin_prot pa_type_conv.cma
pa_sexp_conv.cma pa_bin_prot.cma" -I
ZZZ/lib/godi/lib/ocaml/pkg-lib/sexplib -I
ZZZ/lib/godi/lib/ocaml/pkg-lib/type-conv -I
ZZZ/lib/godi/lib/ocaml/pkg-lib/bin_prot unix.cma nums.cma bigarray.cma
sexplib.cma bin_prot.cma main.ml

all goes well.

When I try to simplify the build instruction with ocamlfind:

	ocamlfind ocamlc -linkpkg -package
sexplib,sexplib.syntax,bin_prot,bin_prot.syntax -syntax camlp4o main.ml

I get the following error:

	Camlp4: Uncaught exception: Not_found

	File "main.ml", line 1, characters 0-1:
	Error: Preprocessor error

What should I put on the command-line along with ocamlfind to be able to
compile the original program; if that is what I am doing wrong.

Thank you very much in advance for the help.

             reply	other threads:[~2012-04-27 18:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-27 18:21 Matej Košík [this message]
     [not found] ` <CE03BFB3-8F84-4AA4-A536-48E8DAC0DF22@metastack.com>
2012-04-27 18:37   ` Matej Košík
2012-04-27 19:29     ` Markus Mottl
2012-04-28 18:12       ` Matej Košík
2012-04-28 18:46         ` Markus Mottl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F9AE39B.8010500@gmail.com \
    --to=5764c029b688c1c0d24a2e97cd764f@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).