From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.7 required=5.0 tests=AWL,HTML_00_10,HTML_MESSAGE, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 53387BC0A for ; Sun, 11 Mar 2007 19:22:53 +0100 (CET) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.177]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2BIMqhS013697 for ; Sun, 11 Mar 2007 19:22:53 +0100 Received: by ik-out-1112.google.com with SMTP id c29so1419352ika for ; Sun, 11 Mar 2007 11:22:52 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=BSyMpSSrbt6wlM2geBazOhK3+FJnOFY5vW1/doX38wjURnmCRIsU3aOUK0OE8laqrmODZP6BJudHsqUJ022atZoABpC+EpypZeYF8y5qFTRF1R7GjuBzmVnVUMrUCLUfHxS7TehqDIZxu5X741Y+A+9xD3DOZktCDUPEfRl/nxQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=jlwZLOks4oUA0V8ehamlprmYgpLIpcJBSqDWvKjHo1hpEzZA0P5xf3214xo0SYx3KOILrRsSh2Z1EiXKSKeYdDULlSqzMPwroAHIVvLxUEgPGd2m3EEXtRqdBbKapp4o8Jx6Zhk8ZDhlZK+75XEtlqUhyYRHHCtzr0dT68GLcgI= Received: by 10.70.66.18 with SMTP id o18mr8496644wxa.1173637371930; Sun, 11 Mar 2007 11:22:51 -0700 (PDT) Received: by 10.100.135.7 with HTTP; Sun, 11 Mar 2007 11:22:51 -0700 (PDT) Message-ID: <2b162d970703111122w23dce20cu260b85ffda620989@mail.gmail.com> Date: Sun, 11 Mar 2007 18:22:51 +0000 From: "Manuel Preliteiro" To: caml-list@yquem.inria.fr Subject: non trivial (at least not to me) Hybrid program compiling MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_18135_2068850.1173637371901" X-j-chkmail-Score: MSGID : 45F448FC.002 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 45F448FC.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; trivial:01 ocaml:01 ocaml:01 lib:01 usr:01 lib:01 testc:01 compiler:01 ocamlopt:01 testc:01 usr:01 compiler:01 ocamlopt:01 compile:01 compile:01 ------=_Part_18135_2068850.1173637371901 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, i'm trying to make a OCaml binding to C library PCSCLite, and i'm not being able to compile it, because for instance, when i try to compile the pcsc_demo.c provided by MUSCLE i do the folowing steps: cc `pkg-config libpcsclite --cflags` -c pcsc_demo.c cc `pkg-config libpcsclite --libs` -o pcsc_demo pcsc_demo.o then when i try to compile my own program i can make the 1st step as above, only ading the OCaml lib path: cc `pkg-config libpcsclite --cflags` -I/usr/lib/ocaml -c testC.c but the problem comes when i have use the OCaml compiler to link to my OCaml and C parts, i tried (with variations): ocamlopt `pkg-config libpcsclite --libs` -o test testC.o testML.ml but i get an option usage error... The error is preaty explicit so i'm not obeying the compiling rules, but i'm not geting how i'm gonna add the `pkg-config libpcsclite --libs` part, because if i dont the C API wont be recognized by the OCaml linker... Thank You Manuel ------=_Part_18135_2068850.1173637371901 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, i'm trying to make a OCaml binding to C library PCSCLite, and i'm not being able to compile it, because for instance, when i try to compile the pcsc_demo.c provided by MUSCLE i do the folowing steps:

cc `pkg-config libpcsclite --cflags` -c pcsc_demo.c
cc `pkg-config libpcsclite --libs` -o pcsc_demo pcsc_demo.o

then when i try to compile my own program i can make the 1st step as above, only ading the OCaml lib path:

cc `pkg-config libpcsclite --cflags` -I/usr/lib/ocaml -c testC.c

but the problem comes when i have use the OCaml compiler to link to my OCaml and C parts, i tried (with variations):

ocamlopt `pkg-config libpcsclite --libs` -o test testC.o testML.ml

but i get an option usage error...

The error is preaty explicit so i'm not obeying the compiling rules, but i'm not geting how i'm gonna add the `pkg-config libpcsclite --libs` part, because if i dont the C API wont be recognized by the OCaml linker...

Thank You
Manuel
------=_Part_18135_2068850.1173637371901--