From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id EA36DBC37 for ; Wed, 27 Jan 2010 14:56:34 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsBAEHVX0vRVdzbimdsb2JhbACTZ4dBPQEBAQoJDAcRBatpCoE4hTeILgEBAwWEMwSDJIdp X-IronPort-AV: E=Sophos;i="4.49,353,1262559600"; d="scan'208";a="42565594" Received: from mail-fx0-f219.google.com ([209.85.220.219]) by mail3-smtp-sop.national.inria.fr with ESMTP; 27 Jan 2010 14:56:34 +0100 Received: by mail-fx0-f219.google.com with SMTP id 19so9151fxm.17 for ; Wed, 27 Jan 2010 05:56:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=1PCoKJ/wZKp8LrkyaG0gtoUTMEysYy7w2GgolnXn0RA=; b=EkTUySLZsrQgj1PzjM1NgriphI5x7AmeNpH27AI0ev8Dfulrkf59cZ45dRiS/kHnPU FPSYNAMQT9Wj6PIq92BY4PuxpNX7QnFDoxPprv/ejNwdBBRhRO6hv7AlQtLItQi6I6UR 0U85VqPuAXjdI8EOF5fyDmwwcDbxsUDKfik3U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=TUfXfcP4ng5tz2mIVxkEjH4mr51aGtUNtnQEkJngwW9YA5P0jfaGgrkxL87YAouq9S CwBSf8Dp9ZhRp3myBlaXAQxm0WQo7wLBsc/japOL4tjuyClYWRY9oqg6YKYtS5IbJDrF PpR+hWaPFO0IwVsgn8fR1Q0rXLpdvdocBknik= Received: by 10.87.11.25 with SMTP id o25mr3910449fgi.23.1264600594114; Wed, 27 Jan 2010 05:56:34 -0800 (PST) Received: from ?172.17.0.15? (papillon.metalscan.fr [212.73.210.234]) by mx.google.com with ESMTPS id e20sm22215fga.27.2010.01.27.05.56.33 (version=SSLv3 cipher=RC4-MD5); Wed, 27 Jan 2010 05:56:33 -0800 (PST) Message-ID: <4B604610.607@gmail.com> Date: Wed, 27 Jan 2010 14:56:32 +0100 From: Matthieu Dubuget Reply-To: matthieu.dubuget@gmail.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8pre) Gecko/20100124 Shredder/3.0.2pre MIME-Version: 1.0 To: caml-list@inria.fr Subject: dynamic link library path under mingw Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; matthieu:01 dubuget:01 matthieu:01 dubuget:01 mingw:01 compilation:01 ocaml:01 ocamlc:01 stubs:01 ocamlmklib:01 stubs:01 mli:01 bytecode:01 compilation:01 ocamlc:01 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=E9cifi=E9 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=E9cifi=E9 est introuvable. Maybe with CAML_LD_LIBRARY_PATH? $ CAML_LD_LIBRARY_PATH=3Dc:/cygwin/home/matt/m2m/m2m-ml/libeeproms=20 =2E/tests.byte Fatal error: cannot load shared library dllm2mEeproms Reason: Le module sp=E9cifi=E9 est introuvable. In fact, the only way I found is to modify the system dynamic loader=20 searched paths (I tried ld.conf, -dllpath=85): $ PATH=3D"/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