2009-07-02 7 views
1

Voici un programme simple OCaml: helloworld.mlocamlopt sur Windows ne produit pas exécutable

 
print_string "Hello world...\n" ;; 

J'utilise OCaml 3.11.0 (MSVC construit), VS 2008, et bien sûr FlexDLL

Voici comment je le compile (exécuté à partir du shell VS 2008): ocamlopt helloworld.ml -o helloworld

Aucun fichier exécutable créé. Y a-t-il quelque chose qui ne va pas? Le programme compilé et exécuté sur Linux, cependant.

+0

il doit faire avec la phase de liaison. Vérifiez votre installation d'ocaml et la chaîne d'outils windows requise. – nlucaroni

Répondre

1

Afficher la sortie complète d'ocamlopt.

-o helloworld produira un helloworld binaire (sans extension).

Si vous voulez une extension .exe - spécifier explicitement

ocamlopt helloworld.ml -o helloworld.exe