Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error messages

Status
Not open for further replies.

gijunior

Programmer
Feb 2, 2006
21
0
0
GB
Sorry to be asking what some may seem obvious, but I dont understand how to tackle the following.

I have intstalled GMP's bignum library. It gives no syntax error messages so but when i compile the line

$ gcc -c gmpTest.c -lgmp -o gmpTest
I get
-lgmp: linker input file unused because linking not done

and with this

$ gcc gmpTest.c -lgmp -o gmpTest

i get

/usr/bin/ld: can't locate file for: -lgmp
collect2: ld returned 1 exit status


now in my directory there is now lgmp file, but the gmp manual suggests it is linked this way.

Can anyone help?

Many thanks


Drew
 
try with:

gcc -c gmpTest.c -l[red]/path/to/file/[/red]gmp -o gmpTest

another thing, is the path to gmp lib in the [tt]/etc/ld.so.conf[/tt] ?

Chacal, Inc.[wavey]
 
Thanks for the quick reply, still the same though.

Dont think /etc/ld.so.conf is present on a mac. But maybe incorrect in saying that. Are you able to elaborate on this please?

Many thanks

 
On AIX, -lgmp means: use library libgmp.a

if libgmp.a is not in a directory listed in $LIBPATH or in /lib or in /usr/lib, you may need to specify a -L flag:

gcc ... -L /dir/with/library_files -lgmp



HTH,

p5wizard
 
there is no libgmp.a, there is a libgmp.la, but thats in the local directory, none of these are in usr/lib

is it possible to move it to there?

Do excuse my extreme beginner questions, I really appreciate your advice so far.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top