From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA15217; Tue, 1 Jun 2004 22:06:12 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA14684 for ; Tue, 1 Jun 2004 22:06:11 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mail.libertysurf.net (mail.libertysurf.net [213.36.80.91]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i51K6ASH012344 for ; Tue, 1 Jun 2004 22:06:10 +0200 Received: from dyn-83-152-177-242.ppp.tiscali.fr (83.152.177.242) by mail.libertysurf.net (6.5.036) id 40B6FE110098206C for caml-list@inria.fr; Tue, 1 Jun 2004 22:06:08 +0200 From: Blue Prawn Organization: Linux-Nantes l'Association To: caml-list Subject: [Caml-list] compilation wraper Date: Tue, 1 Jun 2004 22:11:42 +0200 User-Agent: KMail/1.5 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200406012210.50954.blue_prawn@linux-nantes.fr.eu.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Miltered: at concorde with ID 40BCE1B2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; extention:01 gcc:01 ocamlopt:01 ldflags:01 tryed:01 ocmal:01 tryed:01 ocamlopt:01 usr:01 libfoo:01 existant:01 ncurses:01 extention:01 reponds:01 usr:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 th= e=20 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=20 lib. I have tryed the -cclib explained in the ocmal man but it does not wor= k. I have also tryed to given the .so files on the command line to ocamlopt, b= ut=20 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= =20 some existant project to see how it is done? (in the man there's the=20 beginning of an exemple with the ncurses lib but it is not compete.) thanks in advance ___________________________ Bonjour, J'ai des difficult=E9s pour compiler une extention C qui d=E9pend d'une lib= C, qui serait =E0 terme un wraper pour cette lib en fait. L=E0 o=F9 je rencontre des probl=E8mes c'est avec l'=E9dition de liens. Donner les ld falgs au compilateur ocaml ne semble pas fonctionner, il ne veux rien savoir et me r=E9pond avec le usage message des options=20 disponible. J'ai pourtant essay=E9 avec le flag -cclib comme indiqu=E9 dans= le=20 man. J'ai essay=E9 une solution alternative en donnant les .so au compilateur oc= aml=20 sur sa lignede commande, mais cette fois-ci il r=E9ponds : "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 exempl= e=20 simple qui fonctionne, ou encore me conseiller un wraper existant que je=20 pourrais regarder pour voir comment c'est fait (dans le man, y'a un d=E9but= =20 d'exemple pour la lib ncurses mais il n'est pas complet). Ou alors peut-=EAtre que quelqu'un acc=E8pterais que je lui envoie mes fich= iers=20 pour corriger mes erreurs et =EAtre mon "tuteur" ocmal ? (il s'agit d'un pr= ojet=20 Libre, donc pas besoin de r=E9ponses 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