Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Blue Prawn <blue_prawn@linux-nantes.fr.eu.org>
To: caml-list <caml-list@inria.fr>
Subject: [Caml-list] compilation wraper
Date: Tue, 1 Jun 2004 22:11:42 +0200	[thread overview]
Message-ID: <200406012210.50954.blue_prawn@linux-nantes.fr.eu.org> (raw)

Hello,

I don't succed the compilation of a OCaml/C extention that wraps to a C lib.

The problem comes from the linkage, when the .c file is compile with gcc the 
ldfalgs are not given because it is compile as an object. And after
ocamlopt does not understand the ldflags to link to the .so files from the C 
lib. I have tryed the -cclib explained in the ocmal man but it does not work.

I have also tryed to given the .so files on the command line to ocamlopt, but 
it answers:
"ocamlopt: don't know what to do with /usr/lib/libfoo.so"

Could someone given me a link or a working simple exemple, or to advice me 
some existant project to see how it is done? (in the man there's the 
beginning of an exemple with the ncurses lib but it is not compete.)

thanks in advance
___________________________
Bonjour,

J'ai des difficultés pour compiler une extention C qui dépend d'une lib C,
qui serait à terme un wraper pour cette lib en fait.

Là où je rencontre des problèmes c'est avec l'édition de liens.
Donner les ld falgs au compilateur ocaml ne semble pas fonctionner,
il ne veux rien savoir et me répond avec le usage message des options 
disponible. J'ai pourtant essayé avec le flag -cclib comme indiqué dans le 
man.

J'ai essayé une solution alternative en donnant les .so au compilateur ocaml 
sur sa lignede commande, mais cette fois-ci il réponds :
"ocamlopt: don't know what to do with /usr/lib/libfoo.so"

Pourriez-vous m'indiquer un lien traitant du sujet, ou m'indiquer un exemple 
simple qui fonctionne, ou encore me conseiller un wraper existant que je 
pourrais regarder pour voir comment c'est fait (dans le man, y'a un début 
d'exemple pour la lib ncurses mais il n'est pas complet).

Ou alors peut-être que quelqu'un accèpterais que je lui envoie mes fichiers 
pour corriger mes erreurs et être mon "tuteur" ocmal ? (il s'agit d'un projet 
Libre, donc pas besoin de réponses rapides, j'ai tout mon temps)

merci d'avance

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


                 reply	other threads:[~2004-06-01 20:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200406012210.50954.blue_prawn@linux-nantes.fr.eu.org \
    --to=blue_prawn@linux-nantes.fr.eu.org \
    --cc=caml-list@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