# \#linking

**URL:** https://forums.swift.org/tag/linking/751.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [Lld-link warning: section name is longer than 8 characters and will use a non-standard string table](https://forums.swift.org/t/lld-link-warning-section-name-is-longer-than-8-characters-and-will-use-a-non-standard-string-table/89187)

<div class="topic-metadata">

**Author:** [@ktraunmueller](https://forums.swift.org/u/ktraunmueller)\
**Replies:** 4\
**Last updated:** [August 25, 2026, 8:57pm UTC](https://forums.swift.org/t/lld-link-warning-section-name-is-longer-than-8-characters-and-will-use-a-non-standard-string-table/89187 "2026-08-25T20:57:38Z")

</div>

I am getting these lld-link warnings with a recent Swift 6.4 Windows toolchain: C:\\sandbox\\ktraunmueller\\compositor\\Sources\\Win\\Compositor-Win\>cmake --build --preset relwithdebinfo ... \[131/150\] Building Swift Module 'W…

---

## [DylibForge: relinking static archives into dynamic libraries without source code](https://forums.swift.org/t/dylibforge-relinking-static-archives-into-dynamic-libraries-without-source-code/88200)

<div class="topic-metadata">

**Author:** [@loupehope](https://forums.swift.org/u/loupehope)\
**Replies:** 4\
**Last updated:** [August 1, 2026, 2:50pm UTC](https://forums.swift.org/t/dylibforge-relinking-static-archives-into-dynamic-libraries-without-source-code/88200 "2026-08-01T14:50:13Z")

</div>

Static linkage is a common choice for Swift package products in iOS projects. For example, Tuist links package products statically by default. It is often appropriate for release builds but can introduce friction during…

---

## [Funny linking error while compiling for Swift 5 with some construct for 6](https://forums.swift.org/t/funny-linking-error-while-compiling-for-swift-5-with-some-construct-for-6/85054)

<div class="topic-metadata">

**Author:** [@fbartolom](https://forums.swift.org/u/fbartolom)\
**Replies:** 0\
**Last updated:** [February 28, 2026, 12:27pm UTC](https://forums.swift.org/t/funny-linking-error-while-compiling-for-swift-5-with-some-construct-for-6/85054 "2026-02-28T12:27:53Z")

</div>

When I compile my app I receive no errors, but for a final linking error hampering the installation I have no cue about: this is the log file around the log: libsystem\_kernel.dylib\`\_\_pthread\_kill: 0x2502f71c8 \<+0\>: …

---

## [CxxInterop: Swift function returning optional C++ type in shlib doesn't generate metadata](https://forums.swift.org/t/cxxinterop-swift-function-returning-optional-c-type-in-shlib-doesnt-generate-metadata/73423)

<div class="topic-metadata">

**Author:** [@ADKaster](https://forums.swift.org/u/ADKaster)\
**Replies:** 2\
**Last updated:** [February 16, 2026, 6:22pm UTC](https://forums.swift.org/t/cxxinterop-swift-function-returning-optional-c-type-in-shlib-doesnt-generate-metadata/73423 "2026-02-16T18:22:57Z")

</div>

I'm hitting a similar issue to Undefined symbol metadata accessor for \_\_C.CallMeClass in swift::TypeMetadataTrait\<CallMeClass\>::getTypeMetadata() in CallMeClass.o but in a slightly different way. In my case instead of s…

---

## [Are Swift+Objc static libraries supported by Xcode? Are Swift static libraries even supported?](https://forums.swift.org/t/are-swift-objc-static-libraries-supported-by-xcode-are-swift-static-libraries-even-supported/84461)

<div class="topic-metadata">

**Author:** [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Replies:** 7\
**Last updated:** [January 30, 2026, 9:02am UTC](https://forums.swift.org/t/are-swift-objc-static-libraries-supported-by-xcode-are-swift-static-libraries-even-supported/84461 "2026-01-30T09:02:45Z")

</div>

We have an SDK that we vend as both a dynamic framework and static library. We recently added our first Swift file to it, and we are unable to access the Swift code from Objc when building it as a static library: 'MySDK…

---

## [Xcode16 Symbol not Found: \`\_\_ZN5swift39swift51override\` with compatibility flag](https://forums.swift.org/t/xcode16-symbol-not-found-zn5swift39swift51override-with-compatibility-flag/81760)

<div class="topic-metadata">

**Author:** [@s73v3r](https://forums.swift.org/u/s73v3r)\
**Replies:** 0\
**Last updated:** [August 21, 2025, 11:44pm UTC](https://forums.swift.org/t/xcode16-symbol-not-found-zn5swift39swift51override-with-compatibility-flag/81760 "2025-08-21T23:44:04Z")

</div>

I am receiving runtime Symbol not Found errors that start with \_\_ZN5swift39swift51override. I found and am trying to use the -lswiftCompatibility50 and -lswiftCompatibility51 flags. That appears to have gotten rid of th…

---

## ["Missing required module" for C target of SwiftPM dependency within a .framework](https://forums.swift.org/t/missing-required-module-for-c-target-of-swiftpm-dependency-within-a-framework/77011)

<div class="topic-metadata">

**Author:** [@NSExceptional](https://forums.swift.org/u/NSExceptional)\
**Replies:** 5\
**Last updated:** [January 12, 2025, 5:33am UTC](https://forums.swift.org/t/missing-required-module-for-c-target-of-swiftpm-dependency-within-a-framework/77011 "2025-01-12T05:33:26Z")

</div>

If you've seen my previous post, this is somewhat related in that it's about the same project, but my previous post is still unanswered. You don't need to read it if you haven't; I've moved on from my previous approach f…

---

## [Swift 6 toolchain doesn't emit \`.swiftmodules\` files for dynamic library?](https://forums.swift.org/t/swift-6-toolchain-doesnt-emit-swiftmodules-files-for-dynamic-library/75843)

<div class="topic-metadata">

**Author:** [@sebsto](https://forums.swift.org/u/sebsto)\
**Replies:** 2\
**Last updated:** [November 6, 2024, 9:34am UTC](https://forums.swift.org/t/swift-6-toolchain-doesnt-emit-swiftmodules-files-for-dynamic-library/75843 "2024-11-06T09:34:00Z")

</div>

I'm trying to compile and link code against a dynamic library. It used to work until Swift 5.10. It fails on Swift 6 I build my library like this swift build -c debug --product AWSLambdaDeploymentDescriptor with this …

---

## [Use a C++ library built with MDd\_DynamicDebug?](https://forums.swift.org/t/use-a-c-library-built-with-mdd-dynamicdebug/75482)

<div class="topic-metadata">

**Author:** [@natinusala](https://forums.swift.org/u/natinusala)\
**Replies:** 1\
**Last updated:** [November 6, 2024, 1:33am UTC](https://forums.swift.org/t/use-a-c-library-built-with-mdd-dynamicdebug/75482 "2024-11-06T01:33:57Z")

</div>

Hello, I'm trying to link my Swift program (Swift 6.0.1) with a C++ library (in my case, Luau) built in debug mode, so with MDd\_DynamicDebug. If I try to do so,I have the following error: lld-link: error: /failifmismat…

---

## [Duplicate symbols - runtime crash with local SwiftPM package dependencies](https://forums.swift.org/t/duplicate-symbols-runtime-crash-with-local-swiftpm-package-dependencies/73991)

<div class="topic-metadata">

**Author:** [@pkaminski](https://forums.swift.org/u/pkaminski)\
**Replies:** 4\
**Last updated:** [August 22, 2024, 6:27pm UTC](https://forums.swift.org/t/duplicate-symbols-runtime-crash-with-local-swiftpm-package-dependencies/73991 "2024-08-22T18:27:26Z")

</div>

I am creating local swift packages to modularize generated GraphQL binding types for my project, but I'm running into a duplicate symbols runtime warning objc\[15506\]: Class CommonGraphQL19MyMutation is implemented in b…

---

## [Linking libraries like \`DYLD\_INSERT\_LIBRARIES\` at compile time through \`Package.swift\`](https://forums.swift.org/t/linking-libraries-like-dyld-insert-libraries-at-compile-time-through-package-swift/72451)

<div class="topic-metadata">

**Author:** [@nmgswift](https://forums.swift.org/u/nmgswift)\
**Replies:** 0\
**Last updated:** [June 13, 2024, 5:16pm UTC](https://forums.swift.org/t/linking-libraries-like-dyld-insert-libraries-at-compile-time-through-package-swift/72451 "2024-06-13T17:16:27Z")

</div>

I'm doing some security research on macOS, and have a case where I have a binary, compiled from Swift, that I want to run with the DYLD\_INSERT\_LIBRARIES option (or at least something that achieves the same thing). Puttin…

---

## [Undefined symbol metadata accessor for \_\_C.CallMeClass in swift::TypeMetadataTrait\<CallMeClass\>::getTypeMetadata() in CallMeClass.o](https://forums.swift.org/t/undefined-symbol-metadata-accessor-for-c-callmeclass-in-swift-typemetadatatrait-callmeclass-gettypemetadata-in-callmeclass-o/69480)

<div class="topic-metadata">

**Author:** [@uliwitness](https://forums.swift.org/u/uliwitness)\
**Replies:** 0\
**Last updated:** [January 16, 2024, 10:12pm UTC](https://forums.swift.org/t/undefined-symbol-metadata-accessor-for-c-callmeclass-in-swift-typemetadatatrait-callmeclass-gettypemetadata-in-callmeclass-o/69480 "2024-01-16T22:12:05Z")

</div>

I'm trying to create a C++ object in a C++ file and pass it as an argument to a Swift method called from C++, so Swift can call back into C++ using that object. But I get a link error: ld: Undefined symbols: type meta…

---

## [Adding "other linker flags" to a swift package](https://forums.swift.org/t/adding-other-linker-flags-to-a-swift-package/68846)

<div class="topic-metadata">

**Author:** [@simonmcl](https://forums.swift.org/u/simonmcl)\
**Replies:** 1\
**Last updated:** [December 6, 2023, 9:06pm UTC](https://forums.swift.org/t/adding-other-linker-flags-to-a-swift-package/68846 "2023-12-06T21:06:08Z")

</div>

I've run into this issue: Xcode 15 beta 3 linker issue: ld: … | Apple Developer Forums (duplicate library warning) when upgrading to Xcode 15, with my project and a related Swift package i'm building. The warning can be …

---

## [Linker error using swift-numerics and C module](https://forums.swift.org/t/linker-error-using-swift-numerics-and-c-module/67857)

<div class="topic-metadata">

**Author:** [@bbrk24](https://forums.swift.org/u/bbrk24)\
**Replies:** 7\
**Last updated:** [October 16, 2023, 6:44pm UTC](https://forums.swift.org/t/linker-error-using-swift-numerics-and-c-module/67857 "2023-10-16T18:44:18Z")

</div>

$ swift build Building for debugging... error: link command failed with exit code 1 (use -v to see invocation) .build/checkouts/swift-numerics/Sources/\_NumericsShims/include/\_NumericsShims.h:220: error: undefined referen…

---

## [SwiftDriver error (case of static lib contains C++ and Swift)](https://forums.swift.org/t/swiftdriver-error-case-of-static-lib-contains-c-and-swift/67457)

<div class="topic-metadata">

**Author:** [@Bijan](https://forums.swift.org/u/Bijan)\
**Replies:** 0\
**Last updated:** [September 22, 2023, 4:16pm UTC](https://forums.swift.org/t/swiftdriver-error-case-of-static-lib-contains-c-and-swift/67457 "2023-09-22T16:16:35Z")

</div>

I am getting this error when a static library which contains both Swift and Objective-C++, is used by another library which contains only C++ code. Note that, this issue does not happen when the library is shared as oppo…

---

## [Linking LLVMSupport](https://forums.swift.org/t/linking-llvmsupport/65863)

<div class="topic-metadata">

**Author:** [@Nickolas\_Pohilets](https://forums.swift.org/u/Nickolas_Pohilets)\
**Replies:** 1\
**Last updated:** [June 27, 2023, 8:59pm UTC](https://forums.swift.org/t/linking-llvmsupport/65863 "2023-06-27T20:59:55Z")

</div>

I want to use llvm::DenseSet in libswift\_Concurrency.dylib to optimise copying task-locals. Currently it is implemented using std::set, which gives O(n\*long(n)) performance. Usage of llvm::DenseSet makes it O(n) and impr…

---

## [Linker/Compiler limitation on number of protocol extensions?](https://forums.swift.org/t/linker-compiler-limitation-on-number-of-protocol-extensions/65625)

<div class="topic-metadata">

**Author:** [@Iron-Ham](https://forums.swift.org/u/Iron-Ham)\
**Replies:** 8\
**Last updated:** [June 21, 2023, 7:27pm UTC](https://forums.swift.org/t/linker-compiler-limitation-on-number-of-protocol-extensions/65625 "2023-06-21T19:27:31Z")

</div>

Hi all, On our large iOS project, we have a generated module which bridges types together. That is to say: it analyzes the types contained within a different set of modules, it generates public protocols over the relate…

---

## [Dead code stripping on a dynamic framework doesn't strip unused symbols from a linked static library (SPM)](https://forums.swift.org/t/dead-code-stripping-on-a-dynamic-framework-doesnt-strip-unused-symbols-from-a-linked-static-library-spm/63690)

<div class="topic-metadata">

**Author:** [@asavill](https://forums.swift.org/u/asavill)\
**Replies:** 1\
**Last updated:** [May 23, 2023, 9:18pm UTC](https://forums.swift.org/t/dead-code-stripping-on-a-dynamic-framework-doesnt-strip-unused-symbols-from-a-linked-static-library-spm/63690 "2023-05-23T21:18:47Z")

</div>

When a dynamic framework target links a swift package that can be statically linked (I.e. SPM has decided it can be static due to having a single upstream dynamic dependency) unused symbols don't appear to be stripped. I…

---

## [Linking issue in Release configuration while using Swift Concurrency & subclassing](https://forums.swift.org/t/linking-issue-in-release-configuration-while-using-swift-concurrency-subclassing/60804)

<div class="topic-metadata">

**Author:** [@quentinfasquel](https://forums.swift.org/u/quentinfasquel)\
**Replies:** 0\
**Last updated:** [October 12, 2022, 7:42am UTC](https://forums.swift.org/t/linking-issue-in-release-configuration-while-using-swift-concurrency-subclassing/60804 "2022-10-12T07:42:51Z")

</div>

See GitHub repo for example : GitHub - quentinfasquel/swift-task-linking-issue Xcode is enable to archive and result in a linker issue that looks like this : Showing Recent Messages Undefined symbol: \_$s9MyPackage12Bas…
