caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* How to use -cclib correctly?
@ 2009-07-02 13:57 Andre Tampubolon
  2009-07-02 14:08 ` [Caml-list] " Christoph Bauer
  2009-07-02 14:14 ` Alain Frisch
  0 siblings, 2 replies; 3+ messages in thread
From: Andre Tampubolon @ 2009-07-02 13:57 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

I'm compiling a simple program (Ocaml 3.11.0, MSVC version):
ocamlopt -cclib "/MT /link /SUBSYSTEM:WINDOWS" -o birthday.exe birthday.ml

The output is:
** Fatal error: Cannot find file "/MT"
File "caml_startup", line 1, characters 0-1:
Error: Error during linking

How to use the -cclib option correctly?

[-- Attachment #2: Type: text/html, Size: 403 bytes --]

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

* RE: [Caml-list] How to use -cclib correctly?
  2009-07-02 13:57 How to use -cclib correctly? Andre Tampubolon
@ 2009-07-02 14:08 ` Christoph Bauer
  2009-07-02 14:14 ` Alain Frisch
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Bauer @ 2009-07-02 14:08 UTC (permalink / raw)
  To: Andre Tampubolon, caml-list

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

I think the error message is from flexlink. So try 
ocamlopt -cclib -link -cclib "/MT /link /SUBSYSTEM:WINDOWS" -o
birthday.exe birthday.ml <http://birthday.ml/> 

Christoph Bauer



________________________________

	From: caml-list-bounces@yquem.inria.fr
[mailto:caml-list-bounces@yquem.inria.fr] On Behalf Of Andre Tampubolon
	Sent: Thursday, July 02, 2009 3:57 PM
	To: caml-list@yquem.inria.fr
	Subject: [Caml-list] How to use -cclib correctly?
	
	
	I'm compiling a simple program (Ocaml 3.11.0, MSVC version):
	ocamlopt -cclib "/MT /link /SUBSYSTEM:WINDOWS" -o birthday.exe
birthday.ml
	
	The output is:
	** Fatal error: Cannot find file "/MT"
	File "caml_startup", line 1, characters 0-1:
	Error: Error during linking
	
	How to use the -cclib option correctly?
	


[-- Attachment #2: Type: text/html, Size: 1631 bytes --]

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

* Re: [Caml-list] How to use -cclib correctly?
  2009-07-02 13:57 How to use -cclib correctly? Andre Tampubolon
  2009-07-02 14:08 ` [Caml-list] " Christoph Bauer
@ 2009-07-02 14:14 ` Alain Frisch
  1 sibling, 0 replies; 3+ messages in thread
From: Alain Frisch @ 2009-07-02 14:14 UTC (permalink / raw)
  To: Andre Tampubolon; +Cc: caml-list

Andre Tampubolon wrote:
> I'm compiling a simple program (Ocaml 3.11.0, MSVC version):
> ocamlopt -cclib "/MT /link /SUBSYSTEM:WINDOWS" -o birthday.exe 
> birthday.ml <http://birthday.ml>

Linking against the static C runtime library under Windows is no longer 
supported in OCaml 3.11. You can try doing it but I cannot guarantee it 
will work.

Basically, -cclib options are passed to flexlink. Instead of /MT, you 
can try passing the static C runtime library (libcmt.lib ?), and also 
maybe the -custom-crt option (experimental).

Good luck!

-- Alain


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

end of thread, other threads:[~2009-07-02 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-02 13:57 How to use -cclib correctly? Andre Tampubolon
2009-07-02 14:08 ` [Caml-list] " Christoph Bauer
2009-07-02 14:14 ` Alain Frisch

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