caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* How to compile using sexplib?
@ 2008-06-12 16:44 Luca de Alfaro
  2008-06-12 17:28 ` [Caml-list] " Gerd Stolpmann
  0 siblings, 1 reply; 7+ messages in thread
From: Luca de Alfaro @ 2008-06-12 16:44 UTC (permalink / raw)
  To: Inria Ocaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

I am trying to use sexplib to serialize some data structures, as many of you
advised, and I am somewhat stuck trying to compile.
This is what I get:

ocamlfind ocamlc -package
unix,str,vec,mapmin,hashtbl_bounded,fileinfo,intvmap,extlib,mysql,sexplib -I
../../batch/analysis -I +camlp4 -pp camlp4orf -g -c online_db.ml
File "online_db.ml", line 44, characters 22-26:
Parse error: [semi] expected after [str_item] (in [implem])
Preprocessor error

where my line 44 is simply:

type foo_t = int list with sexp

I have the impression that the problem is in how I compile.  Specifically,
if I do not use the "-pp camlp4orf" part, I get a "syntax error", as the
file is not getting preprocessed.
If I use the above -pp line, I get the error I reported.  I am not sure what
is the proper way to preprocess the file, and unfortunately, sexplib does
not explain how to compile code against it.
I am sure this is obvious for everybody, but it is the first time I use
camlp4, so some help would be appreciated.

All the best,

Luca

[-- Attachment #2: Type: text/html, Size: 1196 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-06-13  8:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-12 16:44 How to compile using sexplib? Luca de Alfaro
2008-06-12 17:28 ` [Caml-list] " Gerd Stolpmann
2008-06-12 18:42   ` Markus Mottl
2008-06-12 19:23     ` Sylvain Le Gall
2008-06-12 22:02       ` [Caml-list] " Ian Pye
2008-06-12 22:31         ` Sylvain Le Gall
2008-06-12 19:17   ` [Caml-list] " Markus Mottl

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).