caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Manuel Preliteiro" <hankalagon@gmail.com>
To: caml-list@yquem.inria.fr
Subject: non trivial (at least not to me) Hybrid program compiling
Date: Sun, 11 Mar 2007 18:22:51 +0000	[thread overview]
Message-ID: <2b162d970703111122w23dce20cu260b85ffda620989@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 953 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1036 bytes --]

             reply	other threads:[~2007-03-11 18:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-11 18:22 Manuel Preliteiro [this message]
2007-03-11 18:26 ` [Caml-list] " Chris King

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=2b162d970703111122w23dce20cu260b85ffda620989@mail.gmail.com \
    --to=hankalagon@gmail.com \
    --cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).