caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Florian Hars <florian@hars.de>
To: caml-list@inria.fr
Subject: [Caml-list] Linking camlidl stub code
Date: Fri, 16 Aug 2002 09:14:12 +0200	[thread overview]
Message-ID: <3D5CA644.4000801@hars.de> (raw)

After fighting with the system for some time (I think I learned the hard way 
why the next version of camlidl uses foo_stub.c instead of foo.c :-)) I have an 
IDL file for the C-library I want to use that sort of works (I still have to 
edit  the generates foo.h since I do some enum <-> int and struct mangling that 
requires a header file, but leads to errors with the standard one).

My remainig problem is how to link my programs with the generated stub code.
Right now I have to use "-cclib -lcamlidl" on every program that uses the 
library, which is inconvenient, and, even worse, I have to compile every 
program in the same directory as the stub code, otherwise gcc complains that it 
can't find foo_stub.o. This makes the directory "structure" for the projects 
that use the library a little bit messy.

How do I turn the stub code not only into a library, but into a *usable* library?

The generated cmxa contains things like

   @ *foo_stub.o %-lfoo )-lcamlidl@ 0-L/usr/lib/ocaml

so at least the -lcamlidl part should work without additional incantations, no?

(This is ocaml 3.04/camlidl 1.02, apt-get says that these are the latest 
versions :-))

Yours, Florian Hars.

-------------------
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


             reply	other threads:[~2002-08-16  7:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-16  7:14 Florian Hars [this message]
2002-08-19 15:58 ` Florian Hars

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=3D5CA644.4000801@hars.de \
    --to=florian@hars.de \
    --cc=caml-list@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).