caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Directory problems
@ 2001-05-23 14:35 wester
  2001-05-28 12:26 ` Xavier Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: wester @ 2001-05-23 14:35 UTC (permalink / raw)
  To: caml-list

Hi,

I have the VC++ port of Ocaml3.1 and cygwin installed. When I try to 
make a custom toplevel with ocamlmktop including labltk the linker alwasy 
looks for Tk83.lib and Tcl83.lib in the directory c:\tcl\lib. But I have installed Tcl 
at another location. I tried to set TCL_LIBRARY and TK_LIBRARY accordingly
but this didn't change anything. The only workaround is to place the libs where
the linker is looking for. The second problem I have with cygwin make is that
the ocaml tools are not able to find files when absolute paths are given.
For example ../dir works but /cygdrive/d/projects/dir does not. I also tried
"d:\projects\dir" but this didn't work either. I can place the *.cma or *.cmx files
in a directory that I can reach without specifying absolute paths but this is 
not the most elegant method.  

I would very much appreciate any help on this problems.

Kind regards

Rolf Wester
   
-------------------------------------
Rolf Wester
wester@ilt.fhg.de
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


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

* Re: [Caml-list] Directory problems
  2001-05-23 14:35 [Caml-list] Directory problems wester
@ 2001-05-28 12:26 ` Xavier Leroy
  0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 2001-05-28 12:26 UTC (permalink / raw)
  To: wester; +Cc: caml-list

> I have the VC++ port of Ocaml3.1 and cygwin installed. When I try to
> make a custom toplevel with ocamlmktop including labltk the linker
> alwasy looks for Tk83.lib and Tcl83.lib in the directory
> c:\tcl\lib. But I have installed Tcl at another location. I tried to
> set TCL_LIBRARY and TK_LIBRARY accordingly but this didn't change
> anything.

Yes, this is a problem with the new "autolink" feature in OCaml 3.01:
you don't have to specify external C libraries, but their paths are
hard-wired in the binary distribution (in the .cma file, actually).

> The only workaround is to place the libs where the linker
> is looking for.

Another workaround is:

ocamlc -noautolink -I +labltk labltk.cma <your files> \
  -cclib -llabltk41 \my\path\to\tk83.lib \my\path\to\tcl83.lib

> The second problem I have with cygwin make is that the ocaml tools
> are not able to find files when absolute paths are given.  For
> example ../dir works but /cygdrive/d/projects/dir does not. I also
> tried "d:\projects\dir" but this didn't work either. I can place the
> *.cma or *.cmx files in a directory that I can reach without
> specifying absolute paths but this is not the most elegant method.

I believe this is a Cygwin problem.  The Win32 port of OCaml doesn't
do anything special with the file names given on the command line:
they are passed straight to the Win32 system calls.  Try invoking
OCaml from a Windows "command" shell and see if it works.

Cygwin does do all sorts of transformations over file names when a
Cygwin program (e.g. bash) launches a non-Cygwin program (e.g. ocamlc).
This is because Cygwin has its own view of the file system, with
Unix-like mount points and so on.  On some versions of Cygwin that
I've used, these file name conversions are quite strange, if not
downright buggy, e.g. the Win32 command does not receive the correct
Win32 equivalent of the file specified on the command line.
The only way I got it to work is to mount "C:\" on "/" and have all my
files on C:.  As usual with Cygwin, your mileage may vary...

- Xavier Leroy
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


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

end of thread, other threads:[~2001-05-28 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-23 14:35 [Caml-list] Directory problems wester
2001-05-28 12:26 ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).