caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* -custom under win32
@ 2001-01-22 17:32 jeanmarc.eber
  2001-01-23  9:45 ` Xavier Leroy
  2001-01-23 10:49 ` Lionel Fourquaux
  0 siblings, 2 replies; 4+ messages in thread
From: jeanmarc.eber @ 2001-01-22 17:32 UTC (permalink / raw)
  To: caml-list; +Cc: david.vincent

Hi OCamler!

I want to generate a "closed bytecode" executable under win32 (that contains the
bytecode interpreter so that it can be used on a machine without OCaml
installed). I'm just using the "standard" Ocaml run-time (I haven't written any
C-code to incorporate in the run-time).

1. Do I understand well that I need the Microsoft Linker (cl.exe), but ONLY the
linker, not the C compiler or assembler ?

2. If yes, does anybody know if this linker can be obtained/purchased/...
without buying VC++ ?

3. Can my problem be solved with Cygwin now, in a future version ?

Jean-Marc Eber



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

* Re: -custom under win32
  2001-01-22 17:32 -custom under win32 jeanmarc.eber
@ 2001-01-23  9:45 ` Xavier Leroy
  2001-01-24 18:36   ` Lionel Fourquaux
  2001-01-23 10:49 ` Lionel Fourquaux
  1 sibling, 1 reply; 4+ messages in thread
From: Xavier Leroy @ 2001-01-23  9:45 UTC (permalink / raw)
  To: jeanmarc.eber; +Cc: caml-list, david.vincent

> Hi OCamler!
> 
> I want to generate a "closed bytecode" executable under win32 (that
> contains the bytecode interpreter so that it can be used on a
> machine without OCaml installed). I'm just using the "standard"
> Ocaml run-time (I haven't written any C-code to incorporate in the
> run-time).
> 
> 1. Do I understand well that I need the Microsoft Linker (cl.exe),
> but ONLY the linker, not the C compiler or assembler ?

You don't need the assembler, however you need the C libraries in
addition to the linker, so it looks like the full VC++ is needed to
get "ocamlc -custom" to work.

BUT: if there is no C code in your program, you can build a closed
bytecode executable just by concatenating the standard bytecode
interpreter with your bytecode executable:

copy /b \ocaml\bin\ocamlrun.exe+mybytecode.exe standalone.exe

or if you prefer the Unix-like way:

cat /ocaml/bin/ocamlrun.exe mybytecode.exe > standalone.exe

Easy, wasn't it.

> 2. If yes, does anybody know if this linker can be obtained/purchased/...
> without buying VC++ ?

No idea.

> 3. Can my problem be solved with Cygwin now, in a future version ?

The next release of OCaml will contain a Cygwin port, so you'll be
able to do "ocamlc -custom" without buying VC++.  I think you'll need
to distribute the Cygwin DLL along with the generated executable,
though.

- Xavier Leroy



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

* RE: -custom under win32
  2001-01-22 17:32 -custom under win32 jeanmarc.eber
  2001-01-23  9:45 ` Xavier Leroy
@ 2001-01-23 10:49 ` Lionel Fourquaux
  1 sibling, 0 replies; 4+ messages in thread
From: Lionel Fourquaux @ 2001-01-23 10:49 UTC (permalink / raw)
  To: jeanmarc.eber, caml-list; +Cc: david.vincent

> 
> Hi OCamler!
> 
> I want to generate a "closed bytecode" executable under win32 
> (that contains the
> bytecode interpreter so that it can be used on a machine without OCaml
> installed). I'm just using the "standard" Ocaml run-time (I 
> haven't written any
> C-code to incorporate in the run-time).
> 
> 1. Do I understand well that I need the Microsoft Linker 
> (cl.exe), but ONLY the
> linker, not the C compiler or assembler ?

	You need cl.exe, and it's not the linker, but the compiler.
Mostly, it is used to call link.exe (the linker) with the required
arguments. However, I think ocamlc generate also a simple C file
for the list of primitives. Anyhow, you need VC++.

	Wouldn't it be possible to modify ocamlc so that only
the assembler and the linker are used ? (By generating this
table of primitives in assembly.)

> 
> 2. If yes, does anybody know if this linker can be 
> obtained/purchased/...
> without buying VC++ ?

	The Miscrosoft linker (link.exe) and the assembler (ml.exe)
are included in the Windows 98 DDK and in the Windows 2000 DDK.
Both can be downloaded form Microsoft website. The required
libraries are also included.

> 
> 3. Can my problem be solved with Cygwin now, in a future version ?

	I think so, but I'm not very interested in Cygwin, so you'd
better check.

> 
> Jean-Marc Eber
> 

	Hope this helps,


		Lionel Fourquaux







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

* RE: -custom under win32
  2001-01-23  9:45 ` Xavier Leroy
@ 2001-01-24 18:36   ` Lionel Fourquaux
  0 siblings, 0 replies; 4+ messages in thread
From: Lionel Fourquaux @ 2001-01-24 18:36 UTC (permalink / raw)
  To: caml-list

> -----Message d'origine-----
> De : Pierre.Weis@inria.fr [mailto:Pierre.Weis@inria.fr]De la part de
> Xavier Leroy
> Envoye : mardi 23 janvier 2001 10:45
> A : jeanmarc.eber@lexifi.com
> Cc : caml-list@inria.fr; david.vincent@lexifi.com
> Objet : Re: -custom under win32
> 


> 
> You don't need the assembler, however you need the C libraries in
> addition to the linker, so it looks like the full VC++ is needed to
> get "ocamlc -custom" to work.

	These C libraries are all in the Platform SDK, which can be
downloaded from Microsoft's website.



> 
> > 2. If yes, does anybody know if this linker can be 
> obtained/purchased/...
> > without buying VC++ ?
> 
> No idea.

	I think that an old version of link.exe is available from
ftp.microsoft.com . Newer versions are included in DDKs.


	Hope this helps.


		Lionel Fourquaux




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

end of thread, other threads:[~2001-01-25  8:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-22 17:32 -custom under win32 jeanmarc.eber
2001-01-23  9:45 ` Xavier Leroy
2001-01-24 18:36   ` Lionel Fourquaux
2001-01-23 10:49 ` Lionel Fourquaux

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).