caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Problem with linking threaded program
@ 2004-02-21 21:02 Galchin Vasili
  2004-02-21 21:24 ` ChoJin
  2004-02-21 22:36 ` Kamil Shakirov
  0 siblings, 2 replies; 3+ messages in thread
From: Galchin Vasili @ 2004-02-21 21:02 UTC (permalink / raw)
  To: caml-list

Hello,

   When I try to compile/link a simple thread program
I get:

[vigalchin@localhost OCAMLJUNK]$ ocamlc -thread
-custom threads.cma thread.ml -cclib -lthreads
Error while linking
/usr/lib/ocaml/threads/threads.cma(Thread):
Reference to undefined global `Unix'


Can anybody help?

Regards, Vasili

________________

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Problem with linking threaded program
  2004-02-21 21:02 [Caml-list] Problem with linking threaded program Galchin Vasili
@ 2004-02-21 21:24 ` ChoJin
  2004-02-21 22:36 ` Kamil Shakirov
  1 sibling, 0 replies; 3+ messages in thread
From: ChoJin @ 2004-02-21 21:24 UTC (permalink / raw)
  To: Galchin Vasili; +Cc: caml-list

Galchin Vasili <vngalchin@yahoo.com> writes:

> Hello,
>
>    When I try to compile/link a simple thread program
> I get:
>
> [vigalchin@localhost OCAMLJUNK]$ ocamlc -thread
> -custom threads.cma thread.ml -cclib -lthreads
> Error while linking
> /usr/lib/ocaml/threads/threads.cma(Thread):
> Reference to undefined global `Unix'

Either you can use OCamlMakefile and just define
THREADS = yes

or

you can add unix.cma before threads.cma in your compile line and it
should work.

-- 
Best Regards
ChoJin

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Problem with linking threaded program
  2004-02-21 21:02 [Caml-list] Problem with linking threaded program Galchin Vasili
  2004-02-21 21:24 ` ChoJin
@ 2004-02-21 22:36 ` Kamil Shakirov
  1 sibling, 0 replies; 3+ messages in thread
From: Kamil Shakirov @ 2004-02-21 22:36 UTC (permalink / raw)
  To: Galchin Vasili; +Cc: caml-list

hello,

Galchin Vasili <vngalchin@yahoo.com> writes:

> When I try to compile/link a simple thread program I get:
>
> [vigalchin@localhost OCAMLJUNK]$ ocamlc -thread
> -custom threads.cma thread.ml -cclib -lthreads
> Error while linking
> /usr/lib/ocaml/threads/threads.cma(Thread):
> Reference to undefined global `Unix'
>
>
> Can anybody help?

You forgot to point Unix library.

ocamlc -thread -custom threads.cma unix.cma thread.ml
                                   ^^^^^^^^
Read the OCaml's documentaton and the user's manual. ;)

-- 
kamil

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-22 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-21 21:02 [Caml-list] Problem with linking threaded program Galchin Vasili
2004-02-21 21:24 ` ChoJin
2004-02-21 22:36 ` Kamil Shakirov

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