Re: [swift-users] Package Manager: Link to a static library.

2017-10-11 Thread Jonathan Prescott via swift-users
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 >

Re: [swift-users] Law of Exclusivity runtime false positive?

2017-07-28 Thread Jonathan Prescott via swift-users
Is is possible that the compiler optimized away the call to trigger because it reasoned that you were not really changing any state at all? Because the trigger function is making an assignment of input to output, and the call instance is asking to make a copy of itself, the compiler could

Re: [swift-users] Disable "indexing while building" in Xcode9 (unknown argument: `-index-store-path`)

2017-07-04 Thread Jonathan Prescott via swift-users
I think the indexing while building is really part of Xcode and not Swift since it also works on C, C++, Obj-C and Obj-C++. It’s not just for Swift. Jonathan > On Jul 4, 2017, at 11:18 PM, Jon Shier wrote: > > The feature this thread is about, indexing while building.

Re: [swift-users] Disable "indexing while building" in Xcode9 (unknown argument: `-index-store-path`)

2017-07-04 Thread Jonathan Prescott via swift-users
I’m curious what Swift features you think Apple is developing internally that is not being done concurrently as part of, or totally within, the open-source project. To me, everything that is the compiler(s), debugger, standard librarIes, package manager are all being constructed completely

Re: [swift-users] Can I create a Cocoa app that is only a Swift script?

2017-06-20 Thread Jonathan Prescott via swift-users
Why do you want to do this? What to you mean by “binary stability?” Why not use Xcode to build an application using the swift compiler? > On Jun 20, 2017, at 10:34 AM, tuuranton--- via swift-users > wrote: > > I want the entire code for my entire Mac app to look like

Re: [swift-users] How to optionally link swift framework into another framework

2017-03-06 Thread Jonathan Prescott via swift-users
In most systems, including macOS, everyone uses the same linker, no matter what language. swiftc, at the object code level, supports the same ABI as clang(C/C++/Obj-C/Objc-C++), and in fact, uses a lot of the compiler infrastructure as clang, including pieces of clang. Your example is the

Re: [swift-users] How to optionally link swift framework into another framework

2017-03-06 Thread Jonathan Prescott via swift-users
I think the process is the same as C/C++/Obj-C/Obj-C++, except it’s labelled differently for Swift. In Xcode, users set “C Pre-processor Macro Definitions” with things like USE_LOGGING. In Swift, since it doesn’t use the C pre-processor, Xcode has a separate build setting called “Active

Re: [swift-users] Using C++ libraries in Swift projects?

2017-01-13 Thread Jonathan Prescott via swift-users
To take two lines from your example, you could do something like this if you don’t want to re-write Boost.Logging or build/use native Swift facilities to write to logs: BoostLog.h: // Use this to bridge to Swift via C-compatibility extern “C” void logTrace(const char * str); extern “C”