[CMake] Linking with -l and -L flags
William A. Hoffman
billlist at nycap.rr.com
Fri Jan 13 20:54:49 EST 2006
At 07:29 PM 1/13/2006, William A. Hoffman wrote:
>This may be the flag we are looking for:
>
> -search_paths_first
> By default when the -dynamic flag is in effect, the -lx and
> -weak-lx options first search for a file of the form
> `libx.dylib' in each directory in the library search path, then
> a file of the form `libx.a' is searched for in the library
> search paths. This option changes it so that in each path
> `libx.dylib' is searched for then `libx.a' before the next path
> in the library search path is searched.
>
>So, -Wl,-search_paths_first.
I just verified this works:
c++ junk.o -ltcl -L. -Wl,-search_paths_first
-Bill
More information about the CMake
mailing list