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
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs