caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Matej Kosik <5764c029b688c1c0d24a2e97cd764f@gmail.com>
To: Gerd Stolpmann <info@gerd-stolpmann.de>
Cc: OCaml <caml-list@inria.fr>
Subject: Re: [Caml-list] a question about compilation ... [sexplib; gramlib]
Date: Fri, 20 Sep 2013 09:54:26 +0100	[thread overview]
Message-ID: <523C0D42.1000902@gmail.com> (raw)
In-Reply-To: <1379603809.11824.18.camel@thinkpad>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Thank you all,

On 19/09/13 16:16, Gerd Stolpmann wrote:
> Am Donnerstag, den 19.09.2013, 12:36 +0100 schrieb Matej Kosik:
> 
> Better:
> 
> ocamlfind ocamlc -package camlp4.macro -syntax camlp4o main.ml -c
> 
>> 
>> If my program contains "with sexp" macro, I can get it compiled with the following instructions:
>> 
>> ocamlfind ocamlc -package sexplib,sexplib.syntax -syntax camlp4o main.ml -o main.cmo -c ocamlfind ocamlc -package sexplib,sexplib.syntax -linkpkg main.cmo -o main
>> 
>> Is it technically possible to to compile a program where I use both "__LOCATION__" as well as "with sexp" macros? (like the attached sample)
> 
> Combined:
> 
> ocamlfind ocamlc -package camlp4.macro,sexplib,sexplib.syntax -syntax camlp4o main.ml -c

This works.

I have noticed an additional problem, though.
If I use the above command, then I noticed that adding "with sexp" after a type&exception definition is not an option, but an obligation.

The problem disappears if I reverse the library order:

ocamlfind ocamlc -package sexplib,sexplib.syntax,camlp4.macro -syntax camlp4o sample.ml -c
ocamlfind c -package sexplib,camlp4.gramlib -linkpkg sample.cmo -o sample
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCgAGBQJSPA1BAAoJEMGSqCmYLk+ztwMQALrj6yvTATdE6UGLzfDDoDAn
KNWycblnjesEn9dfnihNgLuUNk/YmO/E7BdxLkWJ8798Qok4XaqZ02rqZ2Ctc1Aq
RhM2wweccVgzG0aDqMpDbSqOZqspNkmkDgMGkSVpWjkowx0kTMeP573AJ1l5F3np
czXYyEpSEKexeE2iLw6ucchIj5XVjYyHXn9EFyWckXKKfTScNqR7gubRNd45uv/E
MLxCGFCV8iXSyTo4f9xGTtbu35DHLEm1MKkw1SAs05H9JRVLHfpZqpCbQW1H2eSy
f6dD/tqvQ5gjv88q0pDhtft4vItnCpmRA3Z5b3k4rhgXKYZo1FYG5P3q9CRTw2cM
qax3zSnRu2tGsrpWluPg+LSnL5ol+pX9WqSf+9j/xvjZkX0ic0oKsW07Hce59Jsj
CqF8zUNRr/Y/lOkNG4T0R1Fg1YHSkImnLxWpt4oUB8fe3DNxXyFWSKx/sT2+vU+F
eilaqv99apCiXljY0LXWEkRXeUQaKdYX1AiPHhr5CkJFHutp4eDDKXRNEeZdQFRp
FVYFAepOvUotpBLms+ArauTMFNxFgC0lN+SgAmVDLGsXfDb3lT7v2SC97lqBceSU
5d+p2CmY07HG959IRvaE4Cr1GqW26lC8/rhdUVjE/4u1kRMZqhRjlw99+Tse3tZZ
M8YnspznLHksf6U2Ft5/
=AyT7
-----END PGP SIGNATURE-----

      reply	other threads:[~2013-09-20  8:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 11:36 Matej Kosik
2013-09-19 12:17 ` Kakadu
2013-09-19 15:16 ` Gerd Stolpmann
2013-09-20  8:54   ` Matej Kosik [this message]

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=523C0D42.1000902@gmail.com \
    --to=5764c029b688c1c0d24a2e97cd764f@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.de \
    /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).