caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Charles Neveu <neveu@artemis.arc.nasa.gov>
Cc: caml-list@inria.fr
Subject: Re: linking ocaml in multithreaded shared dll app
Date: Thu, 14 Dec 2000 19:51:38 +0100	[thread overview]
Message-ID: <20001214195138.A25832@pauillac.inria.fr> (raw)
In-Reply-To: <3A384431.7B553F0C@artemis.arc.nasa.gov>; from neveu@artemis.arc.nasa.gov on Wed, Dec 13, 2000 at 07:53:21PM -0800

> So, is it possible to build the ocaml library multithreaded-DLL?

As Lionel Fourquaux said, it should be possible: just replace /MT by
/MD in the source file config/Makefile.nt and rebuild the whole system.

However, there is an issue with the Unix library, which uses an
undocumented C library function _dosmaperr() to convert from Win32
error codes to Unix-style error codes.  This function is not exported
by the DLL version of the MSVC C library.  Yes, it's a stupid mistake
of mine to rely on this function, and I should have reimplemented my
own.

What Lionel suggests is to get the source code for _dosmaperr() from
the MSVC C library sources, recompile it and add it to your code.
Ponder legal issues before doing this, though.

> If not, where do I find DOSMAP.C? I've searched my CD's, harddrive and
> the net...

The MSVC CD should contain (or used to contain) a ZIP file with the
sources for the C run-time library (look for files or directories
called CRT or something like it).  The source code for _dosmaperr() is
somewhere in there.

Good luck,

- Xavier Leroy



      reply	other threads:[~2000-12-15 12:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-07 19:19 Charles Neveu
2000-11-09 13:28 ` Lionel Fourquaux
2000-11-10  2:37   ` Ken Wakita
2000-12-14  3:53   ` Charles Neveu
2000-12-14 18:51     ` Xavier Leroy [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=20001214195138.A25832@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=neveu@artemis.arc.nasa.gov \
    /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;
as well as URLs for NNTP newsgroup(s).