Why does the order in which libraries are linked sometimes cause errors in GCC?
(See the history on this answer to get the more elaborate text, but I now think it’s easier for the reader to see real command lines). Common files shared by all below commands $ cat a.cpp extern int a; int main() { return a; } $ cat b.cpp extern int b; int a = b; … Read more