caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] ocamlopt, windows, and no console
@ 2006-04-11 20:37 David Allsopp
  0 siblings, 0 replies; 8+ messages in thread
From: David Allsopp @ 2006-04-11 20:37 UTC (permalink / raw)
  To: caml-list

One other option is to change the startup mode of the executable after
compiling and linking it. I did this years ago with <cough> Visual Basic to
make true console applications (the reverse of your problem). I can't find
the code archive, but IIRC it involves changing a single byte in the PE
header that indicates the subsystem to use. The concept of main and winmain
come entirely from C - the actual entry point of your image is independent
of its subsystem so this gets around your linking problem.

I can't get at the machine with the archive of the tool I wrote for doing
this at the moment <sigh>. However, Microsoft have some utilities for doing
this although I don't know whether they will only work for programs
generated with their compiliers - google for Visual Basic's Link utility and
MSVC++'s editbin tool.

Hope this helps,


David

-----Original Message-----
From: caml-list-bounces@yquem.inria.fr
[mailto:caml-list-bounces@yquem.inria.fr] On Behalf Of Jonathan Roewen
Sent: 11 April 2006 04:08
To: Dmitry Bely
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] ocamlopt, windows, and no console

> I guess I'd have to provide a .c file which wraps ocaml's main
> procedure then, which probably isn't too hard. Which then leads me to
> requesting an option for the ocamlopt compiler for windows to have an
> option to do this all automatically.

And back to the task at hand: how do I specify a .lib file on the
command line to get this all to link? I can't figure out the
cclib/ccopt options to pass to ocamlopt =/

Jonathan

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


^ permalink raw reply	[flat|nested] 8+ messages in thread
* [Caml-list] ocamlopt, windows, and no console
@ 2006-04-10 15:19 Jonathan Roewen
  2006-04-10 17:21 ` Dmitry Bely
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Roewen @ 2006-04-10 15:19 UTC (permalink / raw)
  To: OCaml

Hi,

How does one generate an .exe using ocamlopt that doesn't launch a
console window?

Jonathan


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

end of thread, other threads:[~2006-04-11 20:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-11 20:37 [Caml-list] ocamlopt, windows, and no console David Allsopp
  -- strict thread matches above, loose matches on Subject: below --
2006-04-10 15:19 Jonathan Roewen
2006-04-10 17:21 ` Dmitry Bely
2006-04-10 17:41   ` Igor Peshansky
2006-04-11  2:41   ` Jonathan Roewen
2006-04-11  3:07     ` Jonathan Roewen
2006-04-11 14:33       ` David Allsopp
2006-04-11 17:31     ` Harry Chomsky

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