|
From: Keith M. <kei...@us...> - 2012-12-31 14:13:34
|
On 31/12/12 01:29, Keith Marshall wrote: > This is not correct. The OP specified "-l/libfl.a"; ld will interpret > this as 'search for the RELATIVE library path name "lib/libfl.a.a"', Actually, to give the complete picture, as described in: http://sourceware.org/binutils/docs-2.23.1/ld/WIN32.html#WIN32 with the OP's spec, ld will search for each of the following, in turn: 1) lib/libfl.a.dll.a 2) /libfl.a.dll.a [1] 3) lib/libfl.a.a 4) /libfl.a.lib [1] 5) <prefix>/libfl.a.dll [2] 6) lib/libfl.a.dll 7) /libfl.a.dll [1] > in any of the search paths specified with -L, or the default paths. [1] Notice that these resolve as ABSOLUTE path names; thus, in these cases the library search paths will NOT be consulted, but rather the MSYS path translation, (for a default installation prefix), will map these, (somewhat as LRN has noted), to: 2) C:/MinGW/MSYS/1.0/libfl.a.dll.a 4) C:/MinGW/MSYS/1.0/libfl.a.lib 7) C:/MinGW/MSYS/1.0/libfl.a.dll [2] This case is intended specifically for CygWin, with <prefix> defined by: --dll-search-prefix=cyg so resolving to: 5) cyg/libfl.a.dll However, in default MinGW usage, --dll-search-prefix is undefined; thus <prefix> reduces to NOTHING, and case (5) becomes identical to case (7), which has the effect of promoting case (7) ahead of case (6) in the search order. Of course, none of the above alters the outcome; none of these search patterns matches the OP's intent. -- Regards, Keith. |