bug-gmp
[Top][All Lists]
Advanced

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

Re: linking problem with gmp


From: Anand Dhanakshirur
Subject: Re: linking problem with gmp
Date: Tue, 10 Feb 2004 09:48:44 +0530
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

Hello,
Thanks Kevin....
Yes..I am cross compiling on pentium-3 system running redhat linux 8.0 for the target
processor m68000, The RTOS on m68k is XRTS..What option is should use for configuring?
That is, What i should give for VENDOR-OS ?

The piece of code i have used is like this...
Process Tester()
{
  Hdr *pMsg;
  Int d = 2;
  char a[10], *s;
  mp_exp_t exp;
  mpf_t x,y,z,p;

  s = a;
  mpf_set_default_prec(32);
  mpf_init_set_d(x,3.5666);
  mpf_init_set_d(y,4.56);
  mpf_mul(z,x,y);
  mpf_floor(p,z);
  s = mpf_get_str(0,&exp,10,7,z);
  printest("%s",s);
  mpf_clear(x);
  mpf_clear(y);
  mpf_clear(z);
  mpf_clear(p);

The linker errors , i am getting are like this..


/home/asd/ettdev/tester/libtester.a(testermain.o): In function `Tester':
/home/asd/ettdev/tester/testermain.c:37: undefined reference to `__gmpf_set_default_prec'
/home/asd/ettdev/tester/testermain.c:38: undefined reference to `__gmpf_init_set_d'
/home/asd/ettdev/tester/testermain.c:39: undefined reference to `__gmpf_init_set_d'
/home/asd/ettdev/tester/testermain.c:40: undefined reference to `__gmpf_mul'
/home/asd/ettdev/tester/testermain.c:41: undefined reference to `__gmpf_floor'
/home/asd/ettdev/tester/testermain.c:42: undefined reference to `__gmpf_get_str'
/home/asd/ettdev/tester/testermain.c:44: undefined reference to `__gmpf_clear'
/home/asd/ettdev/tester/testermain.c:45: undefined reference to `__gmpf_clear'
/home/asd/ettdev/tester/testermain.c:46: undefined reference to `__gmpf_clear'
/home/asd/ettdev/tester/testermain.c:47: undefined reference to `__gmpf_clear'
collect2: ld returned 1 exit status
make: *** [systarget] Error 1



Kevin Ryde wrote:
Anand Dhanakshirur <address@hidden> writes:
  
./configure --build=pentium3-pc-linux-gnu --host=none-linux-gnu
(I am using m68k processor and a proprietery RTOS like XRTS.
    

Do you mean you're cross compiling from a p3 gnu system to this m68k?

  
  Since i was not knowing the right option for host, i was using
none-linux-gnu
so that i could get generic one.)
    

You probably want the correct OS part there, if it's not linux-gnu.
Or "unknown-unknown" if your RTOS is not known to configure.

  
I was using mpf_add and mpf_mul functions in my code..
and i was linking my code with libgmp.a ..
But i got linker errors like undefined reference to mpf_add routine
like that..
How to solve this?
    

You'll have to post a sample program and the error messages if you
want help.  See Reporting Bugs in the manual.

  


-- 
Regards,
Anand
       


reply via email to

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