Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] compilation wraper
@ 2004-06-01 20:11 Blue Prawn
  0 siblings, 0 replies; only message in thread
From: Blue Prawn @ 2004-06-01 20:11 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-01 20:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-01 20:11 [Caml-list] compilation wraper Blue Prawn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox