You don’t need the -Xlinker.  -L/path/to/libraries is fine all by itself.


> On Oct 11, 2017, at 12:11 PM, Jonathan Prescott via swift-users 
> <swift-users@swift.org> wrote:
> 
> The library files have to live somewhere.  You need to tell the linker where 
> to look
> So,
> 
> swift build -Xlinker -L/path/to/the/libraries -L/path/to/more/libraries
> 
> should do the trick.  It’s no different than C or C++.
> 
>> On Oct 11, 2017, at 7:23 AM, Evtim Papushev via swift-users 
>> <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
>> 
>> Thanks, but that would not work. Those static library files are not in 
>> /usr/lib nor /usr/local/lib. They are part of the package I’m trying to link 
>> against.
>> 
>> So, swift build checkouts the repo. Then it should link them from it.
>> 
>> Best,
>> Evtim
>> 
>>> On Oct 11, 2017, at 13:49, Fred Appelman <f...@appelman.net 
>>> <mailto:f...@appelman.net>> wrote:
>>> 
>>> swift build -Xlinker "-L/usr/local/lib"
>> 
>> _______________________________________________
>> swift-users mailing list
>> swift-users@swift.org <mailto:swift-users@swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-users
> 
> _______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to