Browse thread
[Caml-list] compilation wraper
- Blue Prawn
[
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: | -- (:) |
| From: | Blue Prawn <blue_prawn@l...> |
| Subject: | [Caml-list] compilation wraper |
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