On Sun, Dec 18, 2011 at 2:49 PM, Keith Marshall <email@example.com> wrote:
Not attempting to quote from unintelligibly top-posted thread;
this relates to ordering of object file and library references on
gcc command line.
Yes, and no. Yes, the issue is well known; so well known that it
On 18/12/11 07:06, Sultan Saini wrote:
> By the way, is this a known issue with MinGW gcc?
is the subject of a FAQ:
However, the issue is NOT a MinGW gcc fault; it is user error.
Not at all. It is standard behaviour for *nix linkers. Object file and
> Seems odd that the order of arguments to the compiler should cause
> a problem like this.
library references are read in strictly left to right order, and symbols
from libraries are only selected for inclusion in the output image if
they have already been identified as needed, by reference in another
file which has been read BEFORE the library itself is read.
Thanks for the explanation, Keith, and once again, my apologies for the top posting.
Even using mingw32-gcc, putting the object files before the library options did not fix my problem, but switching to g++ did.
I should start a new thread, given that the nature of my problem has changed.