Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Linking native ocaml object files into C app on Windows
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: peter.ilberg@n...
Subject: Re: [Caml-list] Linking native ocaml object files into C app on Windows
I've added stdlib.lib and I'm compiling the C file with ocamlopt now, but 
things still aren't working. The link errors for the Lexing module are 
gone, but they were replaced by many more from stdlib.lib.

Where are the functions _caml_curry2/3 or _caml_apply2/3/4 defined? They 
aren't in libasmrun.lib, I verified that with dumpbin. I'm using Ocaml 
3.06.

Peter

ocamlopt -cc cl -ccopt /nologo -ccopt /MT   main.c
ocamllex lexer.mll
ocamlopt -cc cl -ccopt /nologo -ccopt /MT -c -output-obj lexer.ml -o 
lexer.obj
link /nologo /out:test /libpath:"c:\progra~1\object~1\lib" main.obj 
lexer.obj stdlib.lib libasmrun.lib

stdlib.lib(sys.obj) : error LNK2001: unresolved external symbol 
_caml_curry2
stdlib.lib(char.obj) : error LNK2001: unresolved external symbol 
_caml_curry2
stdlib.lib(list.obj) : error LNK2001: unresolved external symbol 
_caml_curry2
lexer.obj : error LNK2001: unresolved external symbol _caml_curry2
stdlib.lib(lexing.obj) : error LNK2001: unresolved external symbol 
_caml_curry2
stdlib.lib(pervasives.obj) : error LNK2001: unresolved external symbol 
_caml_curry2
stdlib.lib(string.obj) : error LNK2001: unresolved external symbol 
_caml_curry2
stdlib.lib(lexing.obj) : error LNK2001: unresolved external symbol 
_caml_apply2
stdlib.lib(list.obj) : error LNK2001: unresolved external symbol 
_caml_apply2
libasmrun.lib(i386nt.obj) : error LNK2001: unresolved external symbol 
_caml_apply2
stdlib.lib(lexing.obj) : error LNK2001: unresolved external symbol 
_caml_curry3
stdlib.lib(pervasives.obj) : error LNK2001: unresolved external symbol 
_caml_curry3
stdlib.lib(string.obj) : error LNK2001: unresolved external symbol 
_caml_curry3
stdlib.lib(list.obj) : error LNK2001: unresolved external symbol 
_caml_curry3
stdlib.lib(pervasives.obj) : error LNK2001: unresolved external symbol 
_End_of_file
libasmrun.lib(fail.obj) : error LNK2001: unresolved external symbol 
_End_of_file
stdlib.lib(pervasives.obj) : error LNK2001: unresolved external symbol 
_Failure
libasmrun.lib(fail.obj) : error LNK2001: unresolved external symbol 
_Failure
stdlib.lib(pervasives.obj) : error LNK2001: unresolved external symbol 
_Invalid_argument
libasmrun.lib(fail.obj) : error LNK2001: unresolved external symbol 
_Invalid_argument
stdlib.lib(pervasives.obj) : error LNK2001: unresolved external symbol 
_caml_curry4
stdlib.lib(string.obj) : error LNK2001: unresolved external symbol 
_caml_curry4
stdlib.lib(list.obj) : error LNK2001: unresolved external symbol 
_caml_curry4
stdlib.lib(string.obj) : error LNK2001: unresolved external symbol 
_Not_found
stdlib.lib(list.obj) : error LNK2001: unresolved external symbol 
_Not_found
libasmrun.lib(fail.obj) : error LNK2001: unresolved external symbol 
_Not_found
stdlib.lib(string.obj) : error LNK2001: unresolved external symbol 
_caml_curry5
stdlib.lib(list.obj) : error LNK2001: unresolved external symbol 
_Assert_failure
stdlib.lib(list.obj) : error LNK2001: unresolved external symbol 
_caml_apply3
libasmrun.lib(i386nt.obj) : error LNK2001: unresolved external symbol 
_caml_apply3
libasmrun.lib(startup.obj) : error LNK2001: unresolved external symbol 
_caml_code_segments
libasmrun.lib(startup.obj) : error LNK2001: unresolved external symbol 
_caml_data_segments
libasmrun.lib(fail.obj) : error LNK2001: unresolved external symbol 
_Out_of_memory
libasmrun.lib(fail.obj) : error LNK2001: unresolved external symbol 
_Stack_overflow
libasmrun.lib(fail.obj) : error LNK2001: unresolved external symbol 
_Sys_error
libasmrun.lib(fail.obj) : error LNK2001: unresolved external symbol 
_Division_by_zero
libasmrun.lib(fail.obj) : error LNK2001: unresolved external symbol 
_Sys_blocked_io
libasmrun.lib(i386nt.obj) : error LNK2001: unresolved external symbol 
_caml_program
libasmrun.lib(roots.obj) : error LNK2001: unresolved external symbol 
_caml_globals
libasmrun.lib(roots.obj) : error LNK2001: unresolved external symbol 
_caml_frametable

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners