caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: skaller@users.sourceforge.net
Cc: caml-list@pauillac.inria.fr
Subject: Re: [Caml-list] Re: Ocamlgraph build error
Date: 01 Apr 2004 19:15:48 +1000	[thread overview]
Message-ID: <1080810947.13854.268.camel@pelican> (raw)
In-Reply-To: <1080770580.13854.126.camel@pelican>

[Patched Ocamlgraph so it works on 32 bit machine]
-------------------
module Elt = struct 
  type t = int 
  let compare = compare 
  let hash = Hashtbl.hash 
  let equal = (=)
end

;;

module MyGraph = Graph.Imperative.Digraph.Concrete(Elt)
;;
let check() =
  let g = MyGraph.create () in
  MyGraph.add_vertex g 1;
  MyGraph.add_vertex g 2;
  MyGraph.add_vertex g 3;
  MyGraph.add_vertex g 4;
  MyGraph.add_vertex g 5;
  MyGraph.add_edge g 1 2;
  MyGraph.add_edge g 2 3;
  print_endline "Graph constructed"
;;


print_endline "Try using graph module";;
check();;

---------------------
This works fine as per instructions:

[skaller@pelican] ~>ocamlc graph.cmo gr.ml -o gr
[skaller@pelican] ~>./gr
Try using graph module
Graph constructed
------------------------------
But this doesn't:

[skaller@pelican] ~>ocamlopt graph.cmx gr.ml -o gr
/tmp/camlstartup43f4c5.o(.text+0xe5): In function `caml_program':
: undefined reference to `camlGraph__Sig__entry'
/tmp/camlstartup43f4c5.o(.text+0xf1): In function `caml_program':
: undefined reference to `camlGraph__Sig_pack__entry'
/tmp/camlstartup43f4c5.o(.text+0xfd): In function `caml_program':
.....
collect2: ld returned 1 exit status
Error during linking
------------------------------

Instructions are:
-----------------------
ocamlgraph is packaged as a single module `Graph'. Link is done as
follows:
 
- bytecode
 
        ocamlc graph.cmo <other files>
 
- native code
 
        ocamlopt graph.cmx <other files>
--------------------

I must be doing something basic wrong .. using CVS ocaml:

Objective Caml version 3.07+13 (2004-01-04)


--

John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net



-------------------
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


      reply	other threads:[~2004-04-01  9:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-31 22:03 skaller
2004-04-01  9:15 ` skaller [this message]

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=1080810947.13854.268.camel@pelican \
    --to=skaller@users.sourceforge.net \
    --cc=caml-list@pauillac.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).