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 XAA14168; Mon, 12 Nov 2001 23:18:30 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA11550 for ; Mon, 12 Nov 2001 23:18:28 +0100 (MET) Received: from stb-mail-01.adept.za.net (stb-mail-01.adept.za.net [64.245.11.2]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id fACMIJH09392 for ; Mon, 12 Nov 2001 23:18:21 +0100 (MET) Received: from spyker.adept.co.za (p29.dialup-01.adept.za.net [64.245.12.29]) by stb-mail-01.adept.za.net (Postfix) with ESMTP id 386801FF52 for ; Tue, 13 Nov 2001 00:18:13 +0200 (SAST) Received: from js by spyker.adept.co.za with local (Exim 3.31 #1 (Debian)) id 163POM-00018m-00 for ; Tue, 13 Nov 2001 00:17:22 +0200 Date: Tue, 13 Nov 2001 00:17:22 +0200 From: Johann Spies To: caml-list@inria.fr Subject: Re: [Caml-list] Ocamlmakefile and Lablgtk Message-ID: <20011113001722.A3664@adept.co.za> Mail-Followup-To: Johann Spies , caml-list@inria.fr References: <20011112153648.A736@adept.co.za> <20011112185939.B4777@chopin.ai.univie.ac.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011112185939.B4777@chopin.ai.univie.ac.at> User-Agent: Mutt/1.3.20i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Nov 12, 2001 at 06:59:39PM +0100, Markus Mottl wrote: > > gtkInit.cmx as in > > I assume the problem is that you haven't specified where to find > libraries. Note that INCDIRS is only for interface files (.cmi), whereas > LIBDIRS is necessary if there are libraries in the directory against > which you want to link. Therefore, add this line: > > LIBDIRS=+lablgtk Thanks for the suggestion. I have added this line, but it makes no difference: js-23:25:58-~/ocaml/lablgtk$make nc make[1]: Entering directory `/home/js/ocaml/lablgtk' ocamlopt -c -labels -w s -I +lablgtk calc.ml ocamlopt -I +lablgtk -ccopt -L+lablgtk lablgtk.cmxa unix.cmxa gtkInit.cmxa -o calc \ calc.cmx Cannot find file gtkInit.cmxa ^^^^^^^^^^^^ The problem is that it should use gtkInit.cmx. There is no gtkInit.cmxa (at least in thei Debian distribution). After your message I went back and read the documentation on the compiler again. I then tried to put /usr/lib/ocaml/lablgtk/gtkInit.cmx on the SOURCES line and it worked in some cases, but I suspect it is not the correct way to do it. I did not previously understand the difference between .cmx and .cmxa files. It becomes clearer now. However the problem is not solved yet. The following Makefile compiles (make nc) without complaints: OCAMLMAKEFILE=/usr/share/ocaml-tools/OcamlMakefile SOURCES=testgtk.ml /usr/lib/ocam/lablgtk/gtkInit.cmx RESULT=testgtk LIBS=lablgtk INCDIRS=+lablgtk LIBDIRS=+lablgtk OCAMLFLAGS=-labels -w s include $(OCAMLMAKEFILE) As I understand it, it should be the equivalent of ocamlopt.opt -w s -I +lablgtk -labels -o testgtk\ lablgtk.cmxa gtkInit.cmx testgtk.ml But the latter produces a binary which runs without a problem and the first (make nc) produces a binary of a different size with a lot of error messages. Johann. -- J.H. Spies - Tel. 021-982 2694 / 082 782 0336 / 021-808 4036(w) Posbus 4668, Tygervallei 7536 "And we know that all things work together for good to them that love God, to them who are the called according to his purpose." Romans 8:28 ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr