Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
windows and C libs
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-06-21 (18:48)
From: Dmitry Bely <dmitry.bely@g...>
Subject: Re: [Caml-list] windows and C libs
On 6/21/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?

They are library files to link with Ocaml programs, aren't they?
(otherwise why are you duplicating Ocaml naming convention). If yes I
believe my advice is correct - you should install C glue libraries
into the locations mentioned above (you may use %OCAMLLIB%\xxxx to not
pollute the root lib directory. Then you specify -I +xxxx while

> > > 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,

Use there the short name also:

set OCAMLLIB=C:\Progra~1\Ocaml\lib

> Is there a command to transform a long name into a short
> one?  What about vista?

Yes, it's possible, but probably still not what you need:

echo %~s1

C:\Temp>short.bat "C:\Documents and Settings"

- Dmitry Bely