I have a small OCaml library that wraps a couple of C functions that I 
wrote. I'm able to compile the project to a .cmx?a file just fine using 
ocamlbuild.

I have the following files

src
    geolocalisation_c.c
    geolocalisation.ml
    geolocalisation.mllib

I want to be able to play around with my code in a top-level, and I'm able 
to do this just fine with the following series of commands.

    ocamlbuild src/geolocalisation_c.o
    ocamlbuild -pkgs ounit src/geolocalisation.cma
    ocamlmktop -custom -cclib -lGeoIp _build/src/geolocalisation_c.o 
_build/src/geolocalisation.cma -o myutop

To verify that it works I run

    ./myutop -I _build/src/
    #load "geolocalisation.cmo";;
    Geolocalisation.create_context;;

and I get the correct type-signature printed in the top-level.

The next thing I want to do is create an OPAM package for it that my 
co-workers and I can use. My question is, will I be able to create the 
package in such a way that the library can be loaded into utop using topfindso 
we don't have to build a custom top-level in the projects that use this 
library? Basically I would like the users of the library to be unaware that 
it invokes external c functions.

If it is possible, do you have any pointers to where I might find some 
information about how to do it?

Cheers,
Mads

-- 
-- 
You received this message because you are subscribed to the Google Groups 
"ocaml-developer" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ocaml-developer?hl=en
For other OCaml forums, see http://caml.inria.fr/resources/forums.en.html
--- 
You received this message because you are subscribed to the Google Groups 
"ocaml-developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to