18 Sep
2013
18 Sep
'13
10:47 a.m.
On 09/18/2013 08:40 AM, Ulf Samuelsson wrote:
No, the solution is simple. The -l<library> must be AFTER the reference to the object files.
FAIL: g++ -lboost_system myfile.o OK: g++ myfile.o -lboost_system
Maybe there is a good reason for this.
Many linkers are single-pass linkers because that gives better linking speed. See "The linking process" section of: http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking/