caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Jonathan Roewen" <jonathan.roewen@gmail.com>
To: "Dmitry Bely" <dbely@mail.ru>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] ocamlopt, windows, and no console
Date: Tue, 11 Apr 2006 14:41:16 +1200	[thread overview]
Message-ID: <ad8cfe7e0604101941k2093d308q5cfc3732db9722c8@mail.gmail.com> (raw)
In-Reply-To: <3bgljqhr.fsf@mail.ru>

> What Ocaml build are you using? If Mingw one then I am afraid it's not
> possible, but if it's MSVC-based I would try to play with
>
> -cclib /link -cclib /subsystem:windows
>
> options.

Indeed I was scanning the options, and found those. The problem is
that when you use that, you have to use WinMain instead...

C:\reflection>ocamlopt -cclib "/MD /link /SUBSYSTEM:WINDOWS" -o refl.exe -I +lab
lgl lablgl.cmxa lablglut.cmxa refl.ml
cl : Command line warning D4025 : overriding '/MT' with '/MD'
LIBCMT.lib(wincrt0.obj) : error LNK2019: unresolved external symbol _WinMain@16
referenced in function _WinMainCRTStartup
refl.exe : fatal error LNK1120: 1 unresolved externals
Error during linking

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.

Jonathan


  parent reply	other threads:[~2006-04-11  9:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2006-04-11  3:07     ` Jonathan Roewen
2006-04-11 14:33       ` David Allsopp
2006-04-11 17:31     ` Harry Chomsky
2006-04-11 20:37 David Allsopp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad8cfe7e0604101941k2093d308q5cfc3732db9722c8@mail.gmail.com \
    --to=jonathan.roewen@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=dbely@mail.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).