Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Dumb question on bytecode compiler
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Skaller <skaller@o...>
Subject: [Caml-list] Dumb question on bytecode compiler
This works fine with the optimising compiler:

ocamlopt.opt  -I src  -a -o src/flxlib.cmxa src/flx_version.cmx src/flx_getopt.cmx src/flx_util.cmx 
src/flx_mtypes.cmx src/flx_srcref.cmx src/flx_typing.cmx src/flx_exceptions.cmx src/flx_string.cmx 
src/flx_id.cmx src/flx_print.cmx src/flx_typing2.cmx src/flx_unify.cmx src/flx_charset.cmx 
src/flx_parse.cmx src/flx_keywords.cmx src/flx_lex.cmx src/flx_pretok.cmx src/flx_lex1.cmx 
src/flx_tok.cmx src/flx_parse_ctrl.cmx src/flx_dfa.cmx src/flx_pat.cmx src/flx_constfld.cmx 
src/flx_macro.cmx src/flx_desugar.cmx src/flx_mbind.cmx src/flx_symtab.cmx src/flx_lookup.cmx 
src/flx_bbind.cmx src/flx_use.cmx src/flx_name.cmx src/flx_cexpr.cmx src/flx_csubst.cmx 
src/flx_tgen.cmx src/flx_display.cmx src/flx_ogen.cmx src/flx_gen.cmx
ocamlopt.opt  -I src  -cclib "-Lsrc  -lnums" -o bin/flxl nums.cmxa unix.cmxa flxlib.cmxa flxl.cmx

The same code with automatically generated changes for the bytecode compiler
(not finished doing the changes yet though)

ocamlc.opt  -I src  -a -o src/flxlib.cma src/flx_version.cmo src/flx_getopt.cmo src/flx_util.cmo 
src/flx_mtypes.cmo src/flx_srcref.cmo src/flx_typing.cmo src/flx_exceptions.cmo src/flx_string.cmo 
src/flx_id.cmo src/flx_print.cmo src/flx_typing2.cmo src/flx_unify.cmo src/flx_charset.cmo 
src/flx_parse.cmo src/flx_keywords.cmo src/flx_lex.cmo src/flx_pretok.cmo src/flx_lex1.cmo 
src/flx_tok.cmo src/flx_parse_ctrl.cmo src/flx_dfa.cmo src/flx_pat.cmo src/flx_constfld.cmo 
src/flx_macro.cmo src/flx_desugar.cmo src/flx_mbind.cmo src/flx_symtab.cmo src/flx_lookup.cmo 
src/flx_bbind.cmo src/flx_use.cmo src/flx_name.cmo src/flx_cexpr.cmo src/flx_csubst.cmo 
src/flx_tgen.cmo src/flx_display.cmo src/flx_ogen.cmo src/flx_gen.cmo
ocamlc.opt  -I src  -cclib "-Lsrc  -lnums" -o bin/flxl nums.cma unix.cma flxlib.cma flxl.cmo

Error while linking src/flxlib.cma(Flx_lex):
Reference to undefined global `Flx_lex'

How can linking the module Flx_lex from file
'flx_lex' cause a reference to an undefined symbol
which is its own name?

[Yeah, I guess the -cclib stuff still needs fixing .. but I get the same
error without that stuff in the command ..]

[BTW: do I need to use  -custom to integrate nums and unix? Is
there a way to produce a platform independent system, of do I have at
least to build, on each platform, a runtime including nums and unix?]

Sorry for dumb questions: I've never use the bytecode compiler before.

FYI: the source for Flx_lex is generated by ocamllex.

John Max Skaller,
snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: