Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* dynamic link library path under mingw
@ 2010-01-27 13:56 Matthieu Dubuget
  2010-01-27 16:17 ` [Caml-list] " Xavier Leroy
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu Dubuget @ 2010-01-27 13:56 UTC (permalink / raw)
  To: caml-list

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


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

end of thread, other threads:[~2010-01-27 17:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-27 13:56 dynamic link library path under mingw Matthieu Dubuget
2010-01-27 16:17 ` [Caml-list] " Xavier Leroy
2010-01-27 17:06   ` Matthieu Dubuget
2010-01-27 17:20     ` Matthieu Dubuget

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox