---
slug: "duplicatesymbolのリンカエラーが出たり出なかったり"
title: "Getting Inconsistent Duplicate Symbol Linker Errors"
description: "\n\n\nWhen building an iOS app in Xcode, you may encounter the following error:"
url: "https://www.ytyng.com/en/blog/duplicatesymbolのリンカエラーが出たり出なかったり"
publish_date: "2015-08-07T01:49:18Z"
created: "2015-08-07T01:49:18Z"
updated: "2026-02-27T11:08:06.772Z"
categories: ["iOS"]
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20230812/12f196ebb1e64a8880502f5455e2fbb9.png.webp?width=768"
has_video: false
has_music: false
video_urls: []
music_urls: []
lang: "en"
---

# Getting Inconsistent Duplicate Symbol Linker Errors

<div class="document">


<p>When building an iOS app in Xcode, you may encounter the following error:</p>
<pre class="literal-block">duplicate symbol _hogehoge in:
  /Users/................../Xxxx.framework/Xxxx(Xxxx.o)
  /Users/................../Xxxx.framework/Xxxx(Xxxx.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
</pre>
<p>This error might appear or not depending on the environment.</p>
<p>It could be related to the -all_load flag in the project's settings. To check this, navigate to the project page → TARGETS → Build Settings → Linking → Other Linker Flags.</p>
<p>When the -all_load flag is included, it evaluates all extern symbols initially (not entirely sure about this), and if there are duplicate symbol names, it will result in an error, preventing the build from succeeding.</p>
<p>When creating a library, try including ( -ObjC and ) -all_load to build and verify the operation.</p>
</div>
