From: Matthieu Dubuget <matthieu.dubuget@gmail.com>
To: caml-list@inria.fr
Subject: dynamic link library path under mingw
Date: Wed, 27 Jan 2010 14:56:32 +0100 [thread overview]
Message-ID: <4B604610.607@gmail.com> (raw)
Hello,
I'm doing something wrong, but can't figure out what?
***********************************
Library compilation, in libeeproms/:
This is a mixed ocaml/c library,
and it depends on a third party DLL
***********************************
$ ocamlc -c eprom_stubs.c
$ ocamlmklib -o m2mEeproms eprom_stubs.o eprom.mli \
eprom.ml EpromDll.dll
***********************************
Bytecode program compilation, in tests/:
***********************************
$ cd ../tests
$ ocamlc -I c:/cygwin/home/matt/m2m/m2m-ml/libeeproms \
-I c:/cygwin/home/matt/ocamlmgw/lib/site-lib/oUnit \
unix.cma oUnit.cma m2mEeproms.cma test_eprom.ml tests.ml
$ ./tests.byte
Fatal error: cannot load shared library dllm2mEeproms
Reason: Le module spécifié est introuvable.
Mmm. Ok! I have to help ocamlrun:
$ ocamlrun -I c:/cygwin/home/matt/m2m/m2m-ml/libeeproms tests.byte
Fatal error: cannot load shared library dllm2mEeproms
Reason: Le module spécifié est introuvable.
Maybe with CAML_LD_LIBRARY_PATH?
$ CAML_LD_LIBRARY_PATH=c:/cygwin/home/matt/m2m/m2m-ml/libeeproms
./tests.byte
Fatal error: cannot load shared library dllm2mEeproms
Reason: Le module spécifié est introuvable.
In fact, the only way I found is to modify the system dynamic loader
searched paths (I tried ld.conf, -dllpath…):
$ PATH="/home/matt/m2m/m2m-ml/libeeproms:$PATH" ./tests.byte
Eprom:0:EpromDll.dll revision ... ok
Is this a bug, at least in the documentation ?
$ ocamlc -version
3.11.2
next reply other threads:[~2010-01-27 13:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 13:56 Matthieu Dubuget [this message]
2010-01-27 16:17 ` [Caml-list] " Xavier Leroy
2010-01-27 17:06 ` Matthieu Dubuget
2010-01-27 17:20 ` Matthieu Dubuget
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=4B604610.607@gmail.com \
--to=matthieu.dubuget@gmail.com \
--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