caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Ken Wakita <wakita@is.titech.ac.jp>
To: lionel.fourquaux@wanadoo.fr
Cc: neveu@artemis.arc.nasa.gov, caml-list@inria.fr
Subject: RE: linking ocaml in multithreaded shared dll app
Date: Fri, 10 Nov 2000 11:37:17 +0900	[thread overview]
Message-ID: <20001110113717D.wakita@is.titech.ac.jp> (raw)
In-Reply-To: <000001c04a50$fbed35c0$b2328aa4@wfr01946>


In message (<000001c04a50$fbed35c0$b2328aa4@wfr01946>)
from "Lionel Fourquaux" <lionel.fourquaux@wanadoo.fr>,
talking about "RE: linking ocaml in multithreaded shared dll app",
on Thu, 9 Nov 2000 14:28:41 +0100

> > -----Message d'origine-----
> > De : Pierre.Weis@inria.fr [mailto:Pierre.Weis@inria.fr]De la part de
> > Charles Neveu
> > Envoye : mardi 7 novembre 2000 20:19
> > A : caml-list@inria.fr
> > Objet : linking ocaml in multithreaded shared dll app
> >
> >
> > I'm trying to link the ocaml library into a Windows NT 4.0,
> > MS VC++ 6.0
> > application that uses MFC in a shared dll (because another library,
> > OpenInventor, has to be linked this way).
> > I'm getting an unresolved external symbol error for the symbols
> > __pctype, ___mb_cur_max, and __dosmaperr from files like win32.obj,
> > read.obj, write.obj, etc. (complete text at bottom).
> 
> 	That's because you're linking with msvcrt.dll (DLL version of
> Microsoft's C runtime). OCaml is linked with libcmt.lib (static
> multithreaded
> version of the same).

A while ago when Cygwin patch for ocaml was announced in this list, I
tried to use it with the Mingw framework.  Mingw is a version of gcc
targeted for MFC environment.  It allows production of executable that
does not depend on Cygwin but on msvcrt.dll.  This way we can
distribute executable O'Caml binary executables to those who are not
using Cygwin.  I also tried compiling the GTk on Mingw and make
lablgtk package and execute a small lablgtk application.

> > I'm not a MSVC++ expert, but I'm guessing that the libunix library is
> > compiled to be linked with a statically-linked MFC library. Is this
> > right? Is there anyway to compile it to link to a
> > dynamically-linked MFC
> > library?
> 
> 	Not exactly. OCaml doesn't use MFC. The problem is with the C library.
> Moreover, you can't build the libunix library for linking with msvcrt.dll,
> because it uses the internal function _dosmaperr, which is not exported by
> the DLL.

Mingw lacks many of the unix interface provided by the Cynwin.  I
think we need much porting effort to get most of the Unix and Threads
package to work.

Ken Wakita



  reply	other threads:[~2000-11-10 18:34 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 [this message]
2000-12-14  3:53   ` Charles Neveu
2000-12-14 18:51     ` Xavier Leroy

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=20001110113717D.wakita@is.titech.ac.jp \
    --to=wakita@is.titech.ac.jp \
    --cc=caml-list@inria.fr \
    --cc=lionel.fourquaux@wanadoo.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).