[linuxman@nmt.edu: possible problems with mpfr]

Vincent Lefevre vincent at vinc17.org
Wed Feb 25 14:35:35 CET 2004

> First (as the comments say), when I change the order of the compilation 
> command line, I get linker errors about undefined references to the mpfr 
> functions.  This is weird.

Concerning this problem, it isn't specific to GMP / MPFR. This is a FAQ:


"Many linkers make one pass over the list of object files and
libraries you specify, and extract from libraries only those modules
which satisfy references which have so far come up as undefined.
Therefore, the order in which libraries are listed with respect to
object files (and each other) is significant; usually, you want to
search the libraries last. (For example, under Unix, put any -l
options towards the end of the command line.)"

Vincent Lefèvre <vincent at vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA

More information about the gmp-bugs mailing list