From: Richard Jones <rich@annexia.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Initialization order bug
Date: Thu, 16 Oct 2003 10:18:38 +0100 [thread overview]
Message-ID: <20031016091838.GA1219@redhat.com> (raw)
In-Reply-To: <16269.37646.599166.88324@karryall.dnsalias.org>
Olivier Andrieu provided the right answer to this:
> This sort of things happen when :
> - you have lots of externals in your module (here Perl)
> - the module runs some initialization-time code that doesn't appear
> in the interface
> - the only values referenced by other values are externals
>
> then the module is in fact not linked in : it's not needed because the
> other modules directly call the external functions. The problem is
> that often these externals do not work without the proper
> initialization.
>
> Some workarounds are to :
> - make the initialization code appear in the .mli, through a init
> function for instance
> - use `val' instead of `external' in the .mli
> - use -linkall when linking the program
It works now, but I still think this is a bug.
Rich.
--
Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - all your business data are belong to you.
MONOLITH is an advanced framework for writing web applications in C, easier
than using Perl & Java, much faster and smaller, reusable widget-based arch,
database-backed, discussion, chat, calendaring:
http://www.annexia.org/freeware/monolith/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
prev parent reply other threads:[~2003-10-16 9:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-15 9:36 [Caml-list] "Error while building custom runtime system" Richard Jones
2003-10-15 16:57 ` [Caml-list] Initialization order bug Richard Jones
[not found] ` <16269.37646.599166.88324@karryall.dnsalias.org>
2003-10-16 9:18 ` Richard Jones [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=20031016091838.GA1219@redhat.com \
--to=rich@annexia.org \
--cc=caml-list@inria.fr \
/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