From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 93455BC0A for ; Thu, 21 Jun 2007 12:29:54 +0200 (CEST) Received: from orion.metastack.com (no-dns-yet.demon.co.uk [80.177.38.218] (may be forged)) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5LATpSJ032703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 21 Jun 2007 12:29:53 +0200 Received: from treble (cpc2-cmbg6-0-0-cust535.cmbg.cable.ntl.com [81.107.34.24]) (authenticated bits=0) by orion.metastack.com (8.13.4/8.13.3) with ESMTP id l5LANQXE016619 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Thu, 21 Jun 2007 11:23:28 +0100 From: "David Allsopp" To: References: <20070621094006.51F79BC76@yquem.inria.fr> Subject: Re: [Caml-list] windows and C libs Date: Thu, 21 Jun 2007 11:29:47 +0100 Organization: MetaStack Solutions Ltd. Message-ID: <00aa01c7b3ef$191ff970$6a7ba8c0@treble> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Thread-Index: Acez516kSGfDL/50So+1CcWKfXrsTwABpChA In-Reply-To: <20070621094006.51F79BC76@yquem.inria.fr> X-Miltered: at discorde with ID 467A531F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; libs:01 christophe:01 troestler:01 christophe:01 troestler:01 umh:01 lib:01 libs:01 lib:01 ocaml:01 ocamllib:01 ocamllib:01 stublibs:01 libpcre:01 dllpcre:01 > On Thu, 21 Jun 2007, "Dmitry Bely" wrote: > > > > On 6/20/07, Christophe TROESTLER wrote: > > > > > WINDOWS USERS: Is there a consensus on windows on where the .lib and > > > .dll should go? If not, how about to decide that here so efforts to > > > port libs to windows can set it as the default path. > > > > Do you mean .lib/.dll files of some specific OCaml library? They > > usually go to %OCAMLLIB% and %OCAMLLIB%\stublibs respectively. What's > > wrong with it? > > No, I mean C library files -- e.g. where should the C-pcre libraries > (libpcre.lib, dllpcre.dll) go? Same place? It's less well-defined under Windows because it's not a compiler oriented OS... all the Microsoft Dev. Tools have their own special build environments that set the relevant variables for where the libs are. AFAIK there's no "correct" place for them. > > > WIN32 OCAML: When I give a path -- say -cclib "C:\Documents and > > > Settings\USER\Mes documents\lib\libx.lib" -- containing spaces (but > > > quoted) to include into a library, it is not well quoted when on uses > > > the library (to compile a program). I tried "\"...\"" to not avail. > > > Is there a way around that or must it be considered like a bug? > > > > An obvious workaround is to use the short name: > > C:\Docume~1\USER\Mesdoc~1\lib\libx.lib > > Yes but it is not convenient because it is not returned by, say, > %OCAMLLIB%. Is there a command to transform a long name into a short > one? What about vista? > dir /x returns short names but, alas, it doesn't combine with /b to produce what you're after. However, cygpath --dos does exactly what you need. Incidentally, using %OCAMLLIB% is unreliable - 'ocamlc -where' is better as that will return an answer even for an environment that hasn't defined OCAMLLIB (which isn't mentioned as being necessary in INSTALL in the source distribution...) So, for me, the whole command becomes: for /f "delims=" %F in ('ocamlc -where') do @c:\cygwin\bin\cygpath -d "%F" David