Delivered-To: garrigue at math.nagoya-u.ac.jp Delivered-To: lablgtk at yquem.inria.fr From: Florent Monnier To: lablgtk at yquem.inria.fr Subject: Re: [Lablgtk] lablgtk2 and ocamlc Date: Mon, 20 Jul 2009 23:19:16 +0200 References: <337fefc10907170146i1e7b12b4lcc1c15fe73eecc9d at mail.gmail.com> In-Reply-To: <337fefc10907170146i1e7b12b4lcc1c15fe73eecc9d at mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200907202319.16487.fmonnier at linux-nantes.fr.eu.org> Li Qiao a =E9crit : > Hi all, > > I am new to lablgtk, sorry if this question is too native. > > When trying on the examples, I can run the examples with lablgtk2 ??.ml. > However, when I try using the ocamlc command, it doesn't work. For exampl= e, > for the about.ml example inside the distribution, command "ocamlc -g -I > ../src lablgtk.cma about.ml -o about" (stated in the code) gives me an > error of > > "File "about.ml", line 14, characters 4-24: > Unbound value GWindow.about_dialog" > > But I think lablgtk has installed in my machine since lablgtk2 command > correctly run the example. > Anyone has any idea why this is so? Cos I may prefer the ocamlc command > because I want to link to other ocaml files in my application. > > Thank you very much! > Qiao Li If the command lablgtk2 works (without being preceded by a full path to the= =20 command), it means that lablgtk2 is installed in your system (on unix it=20 means that this program is located in one of the directory contained in the= =20 environment variable $PATH, probably /usr/bin so /usr/bin/lablgtk2). So in= =20 the command line to compile you shouldn't use -I ../src but -I +lablgtk2 The '+' sign replaces the base path of the installed ocaml libraries, so=20 +lablgtk2 stands for /usr/lib/ocaml/lablgtk2 so your full command line should be: ocamlc -g -I +lablgtk2 lablgtk.cma about.ml -o about The path ../src is for when the library is not installed, but just compiled= in=20 this relative directory. _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk