[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#404395: libcamlimages-ocaml-dev: Fails to load images.

Erik de Castro Lopo writes:

Really, you should use :
ocamlfind -package camlimages -linkpkg -o load_image load_image.ml

I think that should be: ocamlfind ocamlopt -package camlimages -linkpkg -o load_image load_image.ml

Yes, off course (typo, as usual).
but that still fails with:
    No implementations provided for the following modules:
Graphics referenced from /usr/lib/ocaml/3.09.2/camlimages/ci_graphics.cmxa(Graphic_image) However, using ocamlc ocamlfind ocamlc -package camlimages -linkpkg -o load_image load_image.ml works. Why?

see below.
But anyway, take a look at your command line. You don't load anything
dealing with png or jpeg... It should have made you think there was a

Actually no. I expected that linking camlimages.cmx would link everything
I needed. Most other Ocaml libraries work this way (unix.cmxa, str.cmxa,
lablgtk, lablgl and so on).

Camlimages was made by upstream, in order to have a fully modular design (
using plugin to register new formats). So, every parts are separated in
a library... I think, i maybe should enhance META.camlimages to be able
to choose only some modules...
Well, in fact, i need to do some patching in my META.camlimages to made
this example work, i open a bug with the good META.camlimages.

Is that why the "ocamlfind ocamlopt" line above doesn't work?

Indeed, there is some typo error (for archive(native), i included graphics,
which is not good...). Use the META provided in the other bug or wait for an
Sylvain Le Gall

Reply to: