[Omake] OCAMLFIND, OCAMLFINDFLAGS and -predicates
Kaspar Rohrer
kaspar.rohrer at bluewin.ch
Tue Apr 24 20:16:54 PDT 2007
Hi,
I'm currently trying to set up an environment for OpenGL and Gtk
programming using Ocaml, Omake and GODI. However, when invoking Omake
with my OMakefile as shown below, I get the following error somewhere
along the way:
+ ocamlfind ocamlopt -package unix,lablGL,lablgtk2 -warn-error A -I .
-o interior.opt interior.cmx fNum.cmx fTest.cmx base.cmx vector2.cmx
angle.cmx matrix2x2.cmx affineMap2.cmx geom2.cmx vector3.cmx
quaternion.cmx matrix3x3.cmx affineMap3.cmx geom3.cmx -linkpkg
No implementations provided for the following modules:
GlGtk referenced from interior.cmx
The problem seems to be that lablgtkgl.cmxa is ignored by ocamlfind
because the lablGL predicate is not specified. (Take a look at the
META file below from lablgtk2/ to see what I mean)
Now for the question: Is there a way in Omake to specify predicates
for `ocamlfind ocamlc / ocamlcp / ocamlopt / ocamlmktop'? I have
already tried to set `OCAMLFINDFLAGS = "-predicates lablGL"', but
then `ocamlfind ocamldep' chokes because it does not accept the `-
predicates' argument'.
Any ideas how I should resolve this?
Regards
- Kaspar Rohrer
OMakefile:
> .PHONY: clean
>
> # OCAMLFLAGS +=
> # OCAMLCFLAGS +=
> # OCAMLOPTFLAGS +=
> # OCAML_LINK_FLAGS +=
> # OCAML_BYTE_LINK_FLAGS +=
> # OCAML_NATIVE_LINK_FLAGS +=
>
> USE_OCAMLFIND = true
> # OCAMLFINDFLAGS = -predicates lablGL
>
> if $(not $(OCAMLFIND_EXISTS))
> eprintln(This project requires ocamlfind, but is was not found.)
> eprintln(You need to install ocamlfind and run "omake --configure".)
> exit 1
>
> NATIVE_ENABLED = true
> BYTE_ENABLED = true
>
> OCAMLPACKS[] =
> unix
> lablGL
> lablgtk2
>
> OCAMLFLAGS += "-predicates lablGL"
>
> FILES[] =
> interior
> base
> fTest
> fNum
> angle
> vector2
> vector3
> quaternion
> matrix2x2
> matrix3x3
> affineMap2
> affineMap3
> geom2
> geom3
>
> PROGRAM = interior
>
> # OCAML_LIBS +=
> # OCAML_CLIBS +=
> # OCAML_OTHER_LIBS += lablgtkgl
> # OCAML_LIB_FLAGS += -I +lablGL -I +lablgtk2
>
> OCamlProgram($(PROGRAM), $(FILES))
>
> .DEFAULT: interior
>
> clean:
> rm -f \
> $(filter-proper-targets $(glob $(addsuffix .*, $(FILES)))) \
> $(PROGRAM).run $(PROGRAM).opt \
> *~
lablgtk2/META:
> description = "Bindings for gtk2"
> requires=""
> requires(lablGL)="lablGL"
> version="20051028"
> archive(byte)="lablgtk.cma lablglade.cma gtkInit.cmo"
> archive(native)="lablgtk.cmxa lablglade.cmxa gtkInit.cmx"
> archive(byte,lablGL)="lablgtk.cma lablgtkgl.cma lablglade.cma
> gtkInit.cmo"
> archive(native,lablGL)="lablgtk.cmxa lablgtkgl.cmxa lablglade.cmxa
> gtkInit.cmx"
> archive(byte,mt) += "gtkThread.cmo"
> archive(native,mt) += "gtkThread.cmx"
> archive(byte,lablGL,mt) += "gtkThread.cmo"
> archive(native,lablGL,mt) += "gtkThread.cmx"
> archive(toploop,mt) += "gtkThInit.cmo"
More information about the Omake
mailing list