Browse thread
Re: [Caml-list] ocamlopt, windows, and no console
- David Allsopp
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-04-11 (20:37) |
From: | David Allsopp <dra-news@m...> |
Subject: | Re: [Caml-list] ocamlopt, windows, and no console |
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