delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/06/26/18:47:29

From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: error while linking using GMP library
Date: Wed, 26 Jun 2002 23:00:35 +0100
Lines: 17
Message-ID: <3D1A3983.49A1CE79@phekda.freeserve.co.uk>
References: <ac26a5e4 DOT 0206250917 DOT 2d1e22da AT posting DOT google DOT com> <3D18C245 DOT 39312534 AT phekda DOT freeserve DOT co DOT uk>
NNTP-Posting-Host: modem-177.barium.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: newsg2.svr.pol.co.uk 1025129662 17978 62.136.47.177 (26 Jun 2002 22:14:22 GMT)
NNTP-Posting-Date: 26 Jun 2002 22:14:22 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Richard Dawe wrote:
[snip]
> Actually I think the linker cannot find an appropriate operator<< to output
> __mpz_structs to a std::ostream. I expect that this function is in
> libgmpxx.a. Try linking in libgmpxx.a (the C++ part of the GMP library):
> 
>     gpp bignum.cpp -o bignum.exe -lgmp -lgmpxx
[snip]

Oops, it should be like this:

    gpp bignum.cpp -o bignum.exe -lgmpxx -lgmp

Regards,

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019