caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Johann Spies <jhspies@adept.co.za>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Ocamlmakefile and Lablgtk
Date: Tue, 13 Nov 2001 00:17:22 +0200	[thread overview]
Message-ID: <20011113001722.A3664@adept.co.za> (raw)
In-Reply-To: <20011112185939.B4777@chopin.ai.univie.ac.at>

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


  reply	other threads:[~2001-11-12 22:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-12 13:36 Johann Spies
2001-11-12 17:59 ` Markus Mottl
2001-11-12 22:17   ` Johann Spies [this message]
2001-11-12 23:40     ` Markus Mottl
2001-11-13  8:10       ` Florian Hars
2001-11-13  8:54         ` Markus Mottl
2001-11-14 13:57           ` Jacques Garrigue
2001-11-14 14:10             ` Markus Mottl
2001-11-13 12:37         ` Johann Spies

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=20011113001722.A3664@adept.co.za \
    --to=jhspies@adept.co.za \
    --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).