[beginner] building an interactive bitstring toplevel

30 views
Skip to first unread message

fcon...@gmail.com

unread,
May 11, 2009, 2:41:06 PM5/11/09
to bitstring
Hello,

I would like to get an ocaml interactive toplevel including the
bitstring syntax.

I tried the command (with ocaml 3.11 since mkcamlp4 doesn't work on
ocaml 3.10) :

mkcamlp4 -I +camlp4 unix.cma dynlink.cma camlp4of.cma
camlp4lib.cma bitstring/pa_bitstring.cmo bitstring/bitstring.cma
bitstring/bitstring_persistent.cma -o test

and it keeps failing to find dynlink.cma.

I am force to use mkcamlp4 to get an interactive bitstring toplevel
(can i use ocamlmktop instead ?)

I first posted this request at the yahoo group :
http://tech.groups.yahoo.com/group/ocaml_beginners/message/11056

Thanks in advance

Richard Jones

unread,
May 12, 2009, 3:26:14 AM5/12/09
to bits...@googlegroups.com
On Mon, May 11, 2009 at 11:41:06AM -0700, fcon...@gmail.com wrote:
> I first posted this request at the yahoo group :
> http://tech.groups.yahoo.com/group/ocaml_beginners/message/11056

I read it there too, and still don't know the answer.

Rich.

--
Richard Jones
Red Hat

Jessica Hamilton

unread,
May 12, 2009, 7:23:50 AM5/12/09
to bitstring
Hi,

I have this working with ocaml-3.10.2. I don't have 3.11.0 on this
machine atm.

First you need to ln -s camlp4lib.cma to Camlp4.cma to make mkcamlp4
work -- prolly need to sudo/su to do that.

Second, command is: mkcamlp4 -I +camlp4 unix.cma toplevellib.cma
camlp4of.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo
topstart.cmo -o ocaml-bitstring

And you'll have your interactive toplevel with bitmatch in it.

Kindest Regards,

Jessica

fcon...@gmail.com

unread,
May 12, 2009, 8:58:16 AM5/12/09
to bitstring
Thanks you for your help , it works perfectly

I have a bitstring toplevel to play with now :)
Actually, I rarely use the toplevel, but it is very convenient to
learn a new syntax, I was getting
tired of "printfing" my code at almost every line.

Thanks again and see you soon on the list, I will definitly use
bitstring to
replace whole parts of my programm (conversion functions between two
proprietary binary protocols)

On 12 mai, 13:23, Jessica Hamilton <jessica.l.hamil...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages