caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Howto link cmas with Ocamlbuild
@ 2010-10-28 10:53 Till Crueger
  2010-10-28 11:41 ` [Caml-list] " Vincent Balat
  0 siblings, 1 reply; 2+ messages in thread
From: Till Crueger @ 2010-10-28 10:53 UTC (permalink / raw)
  To: caml-list

Hi,

I am working on a small project that is going to include a dynamic  
webserver using Ocsigen and Eliom. I am using Ocamlbuild for the  
compilation. The project is also going to use Batteries and Sexplib. This  
means I need to include Sexplib and Batteries within the .cma file for  
Ocsigen to find the libraries. However when I use the Myocamlbuild plugin  
for Batteries the rules for linking cmas wont use linkpkg flag. Right now  
I compile the full project using ocamlbuild and then I have to repeat the  
last step manually. Is there a better way, to get ocamlbuild to include  
the necessary libraries in the .cma?

Thank you,
   Till


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

* Re: [Caml-list] Howto link cmas with Ocamlbuild
  2010-10-28 10:53 Howto link cmas with Ocamlbuild Till Crueger
@ 2010-10-28 11:41 ` Vincent Balat
  0 siblings, 0 replies; 2+ messages in thread
From: Vincent Balat @ 2010-10-28 11:41 UTC (permalink / raw)
  To: caml-list; +Cc: Till Crueger

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

Hi,

It is not a good idea to include batteries and sexplib in your cma.

If your cma is a findlib package (i.e. has a META file with the right 
dependencies inside), Ocsigen server will automatically load the dependencies 
if you write
<library findlib-package="yourpackage"/>
or
<eliom findlib-package="yourpackage" />
in Ocsigen server's configuration file.

If your package does not have a META file, you need to load batteries and 
sexplib manually:
<library findlib-package="batteries"/>
<library findlib-package="sexplib"/>

Vincent


> Hi,
> 
> I am working on a small project that is going to include a dynamic
> webserver using Ocsigen and Eliom. I am using Ocamlbuild for the
> compilation. The project is also going to use Batteries and Sexplib. This
> means I need to include Sexplib and Batteries within the .cma file for
> Ocsigen to find the libraries. However when I use the Myocamlbuild plugin
> for Batteries the rules for linking cmas wont use linkpkg flag. Right now
> I compile the full project using ocamlbuild and then I have to repeat the
> last step manually. Is there a better way, to get ocamlbuild to include
> the necessary libraries in the .cma?
> 
> Thank you,
>    Till

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

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

end of thread, other threads:[~2010-10-28 11:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-28 10:53 Howto link cmas with Ocamlbuild Till Crueger
2010-10-28 11:41 ` [Caml-list] " Vincent Balat

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