From: Florent Monnier <fmonnier@linux-nantes.fr.eu.org>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Caml with main in C + .cmxa
Date: Fri, 3 Feb 2006 19:41:48 +0100 [thread overview]
Message-ID: <200602031941.48639.fmonnier@linux-nantes.fr.eu.org> (raw)
In-Reply-To: <200602031613.13954.fmonnier@linux-nantes.fr.eu.org>
> > % 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 !
--
prev parent reply other threads:[~2006-02-03 18:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-03 15:13 Florent Monnier
2006-02-03 18:41 ` Florent Monnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200602031941.48639.fmonnier@linux-nantes.fr.eu.org \
--to=fmonnier@linux-nantes.fr.eu.org \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).