ocaml - Ocamlopt and missing crt2.o file -


having installed ocaml on windows 7, 64 bit (self-installer), tried create simple exe file

ocamlopt helloworld.ml -o helloworld 

as required used native-code compiler (ocamlopt) visual c++ (i have visual studio 10 installed) , microsoft assembler masm version 8 (mingw installed); have set path variables ocaml (c:\programfiles\ocaml\bin), mingw (c:\programfiles\mingw\bin) , masm (c:\masm32\bin). however, despite best efforts , searching cannot around error message

**fatal error, cannot find file "crt2.o" file "caml_startup", line 1, characters 0-1: error: error during linking. 

except when place helloworld.ml file in lib folder of mingw, crt2.o file located. appreciate answer may straightforward, stuck. appreciated.

i guess mingw needs way find library files - when compiled source - path lib hardcoded in binaries, if not - search in way (environment variables). try building either mingw (or msys) shell provide correct environment or set lib env variable manually. btw when debugging mingw problems easier rule out ocaml first , try building simple c program first.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -