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
>
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
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.
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
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
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
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
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”