[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-02-03 (18:35) |
From: | Florent Monnier <fmonnier@l...> |
Subject: | Re: [Caml-list] Caml with main in C + .cmxa |
> > % ocamlopt -c -I +libMagick magick.cmxa app.ml > > % ocamlopt -output-obj -o mlobj.o unix.cmxa -I +libMagick magick.cmxa \ > > app.cmx > > (untill there, no error messages) > > > > % gcc `Magick-config --cflags --cppflags` main.c -o myapp.opt mlobj.o \ > > -I'/usr/local/lib/ocaml' \ > > -L/usr/local/lib/ocaml \ > > -lunix -lasmrun -lm -ldl \ > > `Magick-config --ldflags --libs` > > > > and then with this last command, I get about 200 errors like this: > > [...] Indeed, the solution was to give the stubs of the binding to gcc: % ls /usr/local/lib/ocaml/libMagick/ dllmagick_stubs.so libmagick_stubs.a magick.a magick.cma magick.cmi magick.cmxa magick.mli % gcc \ `Magick-config --cflags --cppflags` \ main.c -o myapp.opt mlobj.o \ -I'/usr/local/lib/ocaml' \ -L/usr/local/lib/ocaml \ -lunix -lasmrun -lm -ldl \ `Magick-config --ldflags --libs` \ -L/usr/local/lib/ocaml/libMagick \ -lmagick_stubs ++ Thanks a lot to Jonathan and Rabih for your help ! --