caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Bitstring and toplevel
@ 2011-07-01 15:59 Matej Kosik
  2011-07-01 19:48 ` ygrek
  0 siblings, 1 reply; 2+ messages in thread
From: Matej Kosik @ 2011-07-01 15:59 UTC (permalink / raw)
  To: caml-list

Hello,

Besides the standard library, I haven't use any other Ocaml libraries.
Now I am testing bitstring
http://people.redhat.com/~rjones/bitstring/html/Bitstring.html#2_Compiling
(which is awesome).

I can compile programs that take advantage of this library.

I would like to create a new toplevel system with bitstring extensions included.
I do not know how to do it despite the fact that there is an answer (year 2010):
http://groups.google.com/group/bitstring/browse_frm/thread/859ffe46ebe9d60b

When I try this:

	ocamlc unix.cma dynlink.cma camlp4lib.cma -I +camlp4 toplevellib.cma camlp4of.cma -I +bitstring bitstring.cma bitstring_persistent.cma pa_bitstring.cmo topstart.cmo -o mytop Camlp4Bin.cmo -linkall

the command succeeds, but in the new toplevel system:

	kosik@debian:/tmp$ ./mytop 
        	Objective Caml version 3.11.2

		Camlp4 Parsing version 3.11.2

	# Bitstring.set;;
	Error: Unbound value Bitstring.set
	# let bits = BITSTRING { 1 : 4; 10 : 12 } ;;
	Error: Unbound constructor Bitstring.Construct_failure

Bitstring-related things are undefined. Its emberassing, but I can't figure out what is wrong. Can somebody please help?

Thank you very much in advance.

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

* Re: [Caml-list] Bitstring and toplevel
  2011-07-01 15:59 [Caml-list] Bitstring and toplevel Matej Kosik
@ 2011-07-01 19:48 ` ygrek
  0 siblings, 0 replies; 2+ messages in thread
From: ygrek @ 2011-07-01 19:48 UTC (permalink / raw)
  To: Matej Kosik; +Cc: caml-list

On Fri, 01 Jul 2011 17:59:16 +0200
Matej Kosik <kosik@fiit.stuba.sk> wrote:

> Bitstring-related things are undefined. Its emberassing, but I can't figure out what is wrong. Can somebody please help?

Toplevel needs cmi files - it is not 100% standalone. Use #directory directive to specify include paths.

-- 
 ygrek
 http://ygrek.org.ua

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

end of thread, other threads:[~2011-07-01 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-01 15:59 [Caml-list] Bitstring and toplevel Matej Kosik
2011-07-01 19:48 ` ygrek

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