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 
> <[email protected]> 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 <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> swift build -Xlinker "-L/usr/local/lib"
> 
> _______________________________________________
> swift-users mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-users

_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to