caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* cross-compliation from x86 linux to windows?
@ 2008-04-14 20:39 Joel Reymont
  2008-04-18 13:52 ` [Caml-list] " Vladimir Shabanov
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Reymont @ 2008-04-14 20:39 UTC (permalink / raw)
  To: caml-list

Is it possible to reuse on Windows the output
from ocamlc/ocamlopt -output-obj?

Ideally, I would like to have a web service
produce object code on Linux and have another
"linker" put together a DLL on Windows. The DLL
would then be used from C or .NET code.

The goal of this approach is to compile trading
strategies to object code in a web app and then
produce blackbox DLLs in a final step on Windows.

I don't want to have to distribute GCC as part
of my linker program, if not absolutely necessary.

Does this sound like a pipe dream or something real?

	Thanks, Joel

--
wagerlabs.com






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

* Re: [Caml-list] cross-compliation from x86 linux to windows?
  2008-04-14 20:39 cross-compliation from x86 linux to windows? Joel Reymont
@ 2008-04-18 13:52 ` Vladimir Shabanov
  2008-04-18 18:11   ` Richard Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Shabanov @ 2008-04-18 13:52 UTC (permalink / raw)
  To: Joel Reymont; +Cc: caml-list

2008/4/15, Joel Reymont <joelr1@gmail.com>:
> Is it possible to reuse on Windows the output
>  from ocamlc/ocamlopt -output-obj?

I think you can reuse pure bytecode (.cmo .cma w/o C objects) on
different platforms using ocamlc for static linking or Dynlink for
dynamic one.

If you don't need .NET you can just make main program in OCaml which
Dynlinks your blackbox modules. On loading module just registers
necessary functions in main program and provide no public interface
(empty .mli file), so you get module which works only with your
program and no one can call its functions from ocaml interpreter.

If you really need DLLs you can try to compile them on linux using
some windows emulator. OCaml works under Wine. I didn't tried to make
DLLs under Wine but it can be possible.


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

* Re: [Caml-list] cross-compliation from x86 linux to windows?
  2008-04-18 13:52 ` [Caml-list] " Vladimir Shabanov
@ 2008-04-18 18:11   ` Richard Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Jones @ 2008-04-18 18:11 UTC (permalink / raw)
  To: Vladimir Shabanov; +Cc: Joel Reymont, caml-list

On Fri, Apr 18, 2008 at 05:52:35PM +0400, Vladimir Shabanov wrote:
> 2008/4/15, Joel Reymont <joelr1@gmail.com>:
> > Is it possible to reuse on Windows the output
> >  from ocamlc/ocamlopt -output-obj?
> 
> I think you can reuse pure bytecode (.cmo .cma w/o C objects) on
> different platforms using ocamlc for static linking or Dynlink for
> dynamic one.

It used to be the case that this wouldn't work if the modules used the
Unix module (because the implementation of that module is different on
Un*x and non-Un*x-like operating systems).  Haven't tried recently
though.

Rich.

-- 
Richard Jones
Red Hat


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

end of thread, other threads:[~2008-04-18 18:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-14 20:39 cross-compliation from x86 linux to windows? Joel Reymont
2008-04-18 13:52 ` [Caml-list] " Vladimir Shabanov
2008-04-18 18:11   ` Richard Jones

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