GMP problem

abansal5 at abansal5 at
Fri May 29 20:41:30 CEST 2009

Hello , 

This is Ankur . I was trying to install gmp in unix today , which i think i installed it properly but i do not know how to 

COMPILE a program like :

	using namespace std;

	int main (void) 

	mpz_class a, b, c;
	a = 1234;
	b = "-5678";
	c = a+b;
	cout << "sum is " << c << "\n";
	cout << "absolute value is " << abs(c) << "\n";
	cin >> a;
	return 0;
you must include iostream and gmpxx.h files for the above program	
Say I am in dirctory like ~/gmp/gmp-4.2.1 , and three directories (include ,info , lib) are in ~/HPC 

Can you tell me the command how to compile this kind of program 

Thanks a lot 


More information about the gmp-bugs mailing list