Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] ocamlopt under win32

4 views
Skip to first unread message

Philip A. Viton

unread,
Oct 6, 2006, 11:16:14 AM10/6/06
to caml...@yquem.inria.fr

Can anyone tell me what's going wrong here?

Computer: running win xp/sp2 on amd 64
ocamlopt: 3.09.0
ms files: from visual studio 6

I try the following (the smallest independent part of the Hevea distribution):

==== non verbose =====


C:\ProgramFiles\OCaml\hevea\hevea-1.09\native>
c:\ProgramFiles\ocaml\bin\ocamlopt -c bibhva.ml


C:\ProgramFiles\OCaml\hevea\hevea-1.09\native>
c:\ProgramFiles\ocaml\bin\ocamlopt -o bibhva.exe bibhva.cmx

libasmrun.lib(compact.obj) : error LNK2001: unresolved external symbol __ftol2
libasmrun.lib(ints.obj) : error LNK2001: unresolved external symbol __ftol2
libasmrun.lib(floats.obj) : error LNK2001: unresolved external symbol __ftol2
libasmrun.lib(major_gc.obj) : error LNK2001: unresolved external symbol __ftol2
libasmrun.lib(gc_ctrl.obj) : error LNK2001: unresolved external symbol __ftol2
bibhva.exe : fatal error LNK1120: 1 unresolved externals
Error during linking


===================== verbose


C:\ProgramFiles\OCaml\hevea\hevea-1.09\native>c:\ProgramFiles\ocaml\bin\ocamlopt
-verbose -c bibhva.ml
+ ml /nologo /coff /Cp /c /Fo"bibhva.obj" "c:\temp\camlasmfaa835.asm">NUL

C:\ProgramFiles\OCaml\hevea\hevea-1.09\native>c:\ProgramFiles\ocaml\bin\ocamlopt
-verbose -o bibhva.exe bibhva.cmx
+ ml /nologo /coff /Cp /c /Fo"c:\temp\camlstartupca51b3.obj"
"c:\temp\camlstartu
p7461f9.asm">NUL
+ cl /nologo /MT /Fe"bibhva.exe" -I"C:\ProgramFiles\OCaml\lib"
"c:\temp\camlstar
tupca51b3.obj" "C:\ProgramFiles\OCaml\lib\std_exit.obj" "bibhva.obj"
"C:\Program
Files\OCaml\lib\stdlib.lib"
"C:\ProgramFiles\OCaml\lib\libasmrun.lib" advapi32.
lib
libasmrun.lib(compact.obj) : error LNK2001: unresolved external symbol __ftol2
libasmrun.lib(ints.obj) : error LNK2001: unresolved external symbol __ftol2
libasmrun.lib(floats.obj) : error LNK2001: unresolved external symbol __ftol2
libasmrun.lib(major_gc.obj) : error LNK2001: unresolved external symbol __ftol2
libasmrun.lib(gc_ctrl.obj) : error LNK2001: unresolved external symbol __ftol2
bibhva.exe : fatal error LNK1120: 1 unresolved externals
Error during linking

This link failure (with the same unresolved externals message)
appears for all other parts of the hevea distribution too, so it
seems that something is going wrong with any attempt to link.

There's an earlier message on the list to the effect that VC6 isn't
usable with the most recent ocaml distribution: is this really true?

There's also a remark in the most recent ocaml bugfix release to the
effect that something is being fixed specifically for the AMD chip :
could that be the problem?


Any help very gratefully received!

------------------------
Philip A. Viton
City Planning, Ohio State University
275 West Woodruff Avenue, Columbus OH 43210
vit...@osu.edu

_______________________________________________
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

Xavier Leroy

unread,
Oct 9, 2006, 12:36:19 PM10/9/06
to Philip A. Viton
> Can anyone tell me what's going wrong here?
> Computer: running win xp/sp2 on amd 64
> ocamlopt: 3.09.0
> ms files: from visual studio 6
> [...]

> libasmrun.lib(compact.obj) : error LNK2001: unresolved external symbol
> __ftol2

The MSVC binary distribution for OCaml 3.09 was built with Visual C++ 2003,
which is binary-incompatible with Visual Studio 6. There is also
Visual C++ 2005 and the Platform SDK compilers, all from Microsoft,
all subtly incompatible with each other. Complain with Microsoft if
you feel like it.

If you just want to generate .exe files for Windows, may I suggest you
use the MinGW version of OCaml and avoid the MSVC one? MinGW, besides
being free, is also more stable than Microsoft's dev. tools.

- Xavier Leroy

"Dr. Axel Poigné"

unread,
Oct 10, 2006, 5:44:52 AM10/10/06
to Philip A. Viton
This is a classic one. Just add

fix_ftol2.c
0 new messages