bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -lgmp not working, please help.


From: Richard Dawe
Subject: Re: -lgmp not working, please help.
Date: Sat, 10 Jan 2004 19:34:01 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031031

Hello.

Ragbir S. Chana wrote:
I am using cygwin under Win2K, 5.00.2195, Service Pack 4 (just upgraded from SP3 yesterday but no change).
Name of the computer: mecury.
AMD Athlon Processor AT/AT COMPATIABLE.
523,740 KB RAM
cygwin was installed recently under the following directory:
c:\cygwin
gmp is installed under gmp-4.1.2, as follows:
C:\cygwin\usr\gmp-4.1.2
[snip]
When I try to link with gmp libraries, I get the following message
address@hidden <mailto:address@hidden> ~/programs
$ gcc -o test1 test1.c -lgmp
/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lgmp
collect2: ld returned 1 exit status
[snip]

It looks like you haven't install gmp into one of the standard prefixes: /usr or /usr/local (which I guess are actually c:\cygwin\usr and c:\cygwin\usr\local). So ld won't be able to find libgmp.a.

I think you need to include a -L option in the link line, like this:

    gcc -L/usr/gmp-4.1.2/lib -o test1 test1.c -lgmp

Hope that helps, regards,

--
Richard Dawe [ http://homepages.nildram.co.uk/~phekda/richdawe/ ]

"You can't evaluate a man by logic alone."
  -- McCoy, "I, Mudd", Star Trek





reply via email to

[Prev in Thread] Current Thread [Next in Thread]