Simple MPFR program

June Co. juneco at
Fri Jun 18 01:46:41 CEST 2004

In message <Pine.GSO.4.21.0406171518110.25677-100000 at>
   "Simple MPFR program"
   "Jeffrey Green <etruscan at>" wrote:

> compile attempt:  g++ -I/usr/local/gmp-4.1.3/include
> -L/usr/local/gmp-4.1.3/lib/ -lgmp -lmpfr -o grumble grumble.cpp
Your 2 programs are simple and correct.
The order of linked libraries is not correct. Firstly, "-lmpfr". Secondly, "-lgmp".

An example by Cygwin g++ 3.2
	$ g++ -o grumble grumble.cpp -L/usr/local/lib -lmpfr -lgmp
	$ ./grumble
	Hello World!
Tomonori Kouya

More information about the gmp-discuss mailing list