Delivered-To: garrigue at math.nagoya-u.ac.jp Authentication-Results: mailhost.math.nagoya-u.ac.jp sender=lablgtk-bounces at yquem.inria.fr; domainkey=neutral (no query protocol specified; no policy for yquem.inria.fr) Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=Lbn1ep2fJJIfFvCHjs+iJej7j9vtWjDDCiDnKj1RJog=; b=YmaSg/5lAkJYTfTuaKqZCRj02HRio03jaZy7uJbKKYskjpH1sTKrgVxdlSWC10k58s OEFz6fSNz/dsQA6gSuPoh4j0P9oxN47cRLRAoxfBVC+ygx/Mgo8msj+DitdlX7J2rGuB ZmR23JqPwomTQ178nOv0ISoNkZKcddtxUPDEU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=vcCQ18cUie+lyHd2I0VWOpLrlSSdn9iBSeu/4zHoHH5I3MfNdD31OP3gcvEk3qM89C ijIQfV3liQyIo0LUsYAkW2zILWYlAuGtVlYyr1YY7N+fW0HS1O3wqtPYoMszLpXxeQyb n4ZZTbz8LTw+cJspwN1tXsXOe2mI1lDSjlZEE= Subject: Re: [Lablgtk] Compiling examples Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Jacques Garrigue In-Reply-To: Date: Mon, 22 Nov 2010 11:21:59 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: <81E256A6-3686-4C81-8504-C3D786472393 at gmail.com> References: To: Serge Le Huitouze Cc: lablgtk Status: U On 2010/11/22, at 5:19, Serge Le Huitouze wrote: > Instead of asking newbie questions here (which are not answered anyway > ;-), I decided to take it the long way and compile all examples to see > whether they cover what I'm looking for... Probably the right way to go :-) > However, I ran into trouble as early as the second (in lexicographic > order) file, namely "accel_tree.ml"! >=20 > First, it lacks a comment in the header giving the full command line > to compile it. > So I thought I'd try the same command as for "about.ml": > * ocamlc -g -I ../src lablgtk.cma accel_tree.ml -o accel_tree > Which gave me the (not so unusual) warning: > * File "accel_tree.ml", line 80, characters 2-32: > * Warning S: this expression should have type unit. If you look at the README file, you will see that the standard way to = compile examples is: ocamlc -I +lablgtk2 -w s lablgtk.cma gtkInit.cmo ???.ml -o ??? With this command line the above warning disappears, and you link in gtkInit.cmo, which is necessary for most examples (but not for = about.ml). > Executing it terminates immediately with the cryptic message: > * Fatal error: unknown C primitive = `ml_gtk_tree_view_get_visible_range' Checklist: * have you installed lablgtk2 in the standard location? (if the stubs are in a shared library, it needs to be visible from the = ocaml runtime, and you might have an old version installed) * what is the version of lablgtk2 you are using? (at least, with 2.14.2 the above function does exist, and the example = runs correctly) > Googling this primitive produced only one page: > = http://old.nabble.com/Patch-to-add-binding-for-gtk_tree_view_get_visible_r= ange-td26901400.html > which didn't enlighten me much, even more so given that this message > dates from December 2009, whereas file "accel_tree.ml" dates from > August 2008... It may happen that somebody add an example forgetting to add the support = code, but we try to avoid that... Jacques= _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk