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 JAA15694; Fri, 16 Aug 2002 09:14:19 +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 JAA15730 for ; Fri, 16 Aug 2002 09:14:18 +0200 (MET DST) Received: from grisu.bik-gmbh.de (grisu.bik-gmbh.de [194.233.237.82]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g7G7EHr23878 for ; Fri, 16 Aug 2002 09:14:17 +0200 (MET DST) Received: from hars.de (prony.bik-gmbh.de [194.233.237.133]) by grisu.bik-gmbh.de (8.12.3/8.11.1) with ESMTP id g7G7EHAK082573 for ; Fri, 16 Aug 2002 09:14:17 +0200 (CEST) (envelope-from florian@hars.de) Message-ID: <3D5CA644.4000801@hars.de> Date: Fri, 16 Aug 2002 09:14:12 +0200 From: Florian Hars User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.0.0) Gecko/20020529 X-Accept-Language: de-de, en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: [Caml-list] Linking camlidl stub code Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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