On Mon, 2001-10-29 at 11:11, Simon Marlow wrote:
Gérard Milmeister
wrote, On Thu, 2001-10-25 at 13:53, Simon Marlow wrote:
It seems very strange that the libgmp in your GHC installation doesn't work. How did you install GHC? Do you have problems linking other programs, or just gtk+hs programs?
As far as I know, it happens only with gtk+hs. Small
On Sat, 2001-10-27 at 17:27, Manuel M. T. Chakravarty wrote: programs I have
written are linked alright.
Do these small programs actually use any arbitrary precision arthimetic - ie, use the type Integer?
Manuel Something like this?
module Main where
main = print (1000000000000000000000000000000::Integer)
Yes, it works.
I know that gtk+hs adds a -L/usr/lib option to the command line, which comes originally from gtk-config.
I'm still confused by what you said about GHC not linking with the libgmp.a in /opt/ghc, and yet it still manages to link programs using arbitrary precision integers somehow. Normally GHC won't look in /usr/local/lib for libraries, so it won't even find your GMP 3 library at all.
Hmm. All very mysterious. I think you'll need to send us output from ghc -v for a link that failed and one that succeeded.
Cheers, Simon
Here is the output: 1. Main.out from a link that succeeds. 2. GtkHelloWorld.out, a sample program from gtk+hs, compiled with ghc -v -fglasgow-exts -lgtkHS GtkHelloWorld.hs `gtkhs-config --cflags` `gtkhs-config --libs` `gtk-config --cflags` `gtk-config --libs` In fact, you are right, there is a -L/usr/lib before -lgmp. Maybe the libgmp.a included with ghc should be renamed, for example libgmp_ghc.a n.b. I send the message only to you, not to the mailing list because of the attachments. Regards,