* [Caml-list] custom linking not working
@ 2001-07-01 21:02 Ian Zimmerman
2001-07-01 23:19 ` Jacques Garrigue
2001-07-02 7:45 ` Xavier Leroy
0 siblings, 2 replies; 4+ messages in thread
From: Ian Zimmerman @ 2001-07-01 21:02 UTC (permalink / raw)
To: OCAML
What am I doing wrong here???
itz:~# ocamlc -linkall -custom toplevellib.cma /usr/lib/ocaml/libgraphics.a \
topmain.cmo -o ocaml.graphics
itz:~# ./ocaml.graphics
Objective Caml version 3.01
# #load "/usr/lib/ocaml/graphics.cma";;
The external function `gr_set_text_size' is not available
#
itz:~# ocamlc -v
The Objective Caml compiler, version 3.01
Standard library directory: /usr/lib/ocaml
itz:~# nm /usr/lib/ocaml/libgraphics.a | grep gr_set_text_size
000000bc T gr_set_text_size
--
Ian Zimmerman, Oakland, California, U.S.A.
EngSoc adopts market economy: cheap is wasteful, efficient is expensive.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] custom linking not working
2001-07-01 21:02 [Caml-list] custom linking not working Ian Zimmerman
@ 2001-07-01 23:19 ` Jacques Garrigue
2001-07-01 23:24 ` Ian Zimmerman
2001-07-02 7:45 ` Xavier Leroy
1 sibling, 1 reply; 4+ messages in thread
From: Jacques Garrigue @ 2001-07-01 23:19 UTC (permalink / raw)
To: itz; +Cc: caml-list
From: Ian Zimmerman <itz@speakeasy.org>
> What am I doing wrong here???
>
> itz:~# ocamlc -linkall -custom toplevellib.cma /usr/lib/ocaml/libgraphics.a \
> topmain.cmo -o ocaml.graphics
You shouldn't use libgraphics.a, but graphics.cma.
The right invocation is much simpler:
ocamlmktop graphics.cma -o ocaml.graphics
Jacques Garrigue
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] custom linking not working
2001-07-01 23:19 ` Jacques Garrigue
@ 2001-07-01 23:24 ` Ian Zimmerman
0 siblings, 0 replies; 4+ messages in thread
From: Ian Zimmerman @ 2001-07-01 23:24 UTC (permalink / raw)
To: Jacques Garrigue; +Cc: caml-list
itz> What am I doing wrong here???
itz>
itz> itz:~# ocamlc -linkall -custom toplevellib.cma
itz> /usr/lib/ocaml/libgraphics.a \ topmain.cmo -o ocaml.graphics
Jacques> You shouldn't use libgraphics.a, but graphics.cma. The right
Jacques> invocation is much simpler:
Jacques> ocamlmktop graphics.cma -o ocaml.graphics
Well, I know that would work, of course :-)
But what I was trying to do was precisely to avoid linking the
bytecode at build time. Is that impossible?
--
Ian Zimmerman, Oakland, California, U.S.A.
EngSoc adopts market economy: cheap is wasteful, efficient is expensive.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] custom linking not working
2001-07-01 21:02 [Caml-list] custom linking not working Ian Zimmerman
2001-07-01 23:19 ` Jacques Garrigue
@ 2001-07-02 7:45 ` Xavier Leroy
1 sibling, 0 replies; 4+ messages in thread
From: Xavier Leroy @ 2001-07-02 7:45 UTC (permalink / raw)
To: Ian Zimmerman; +Cc: OCAML
> What am I doing wrong here???
>
> itz:~# ocamlc -linkall -custom toplevellib.cma /usr/lib/ocaml/libgraphics.a \
> topmain.cmo -o ocaml.graphics
> itz:~# ./ocaml.graphics
> Objective Caml version 3.01
>
> # #load "/usr/lib/ocaml/graphics.cma";;
> The external function `gr_set_text_size' is not available
> #
> itz:~# ocamlc -v
> The Objective Caml compiler, version 3.01
> Standard library directory: /usr/lib/ocaml
> itz:~# nm /usr/lib/ocaml/libgraphics.a | grep gr_set_text_size
> 000000bc T gr_set_text_size
With -custom, only C primitives actually referenced from Caml code get
linked in. At the very least, you need to link a Caml object file that
just declares "external" all the C primitives you're interested in.
All the best,
- Xavier Leroy
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-07-02 7:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-01 21:02 [Caml-list] custom linking not working Ian Zimmerman
2001-07-01 23:19 ` Jacques Garrigue
2001-07-01 23:24 ` Ian Zimmerman
2001-07-02 7:45 ` Xavier Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox