<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/62277>62277</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            lld-link : error : duplicate symbol
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          yurybura
      </td>
    </tr>
</table>

<pre>
    I'm trying to build application with clang-cl 16.0.0 and see the following linker errors:
```
7>------ Build started: Project: myapp, Configuration: Debug x64 ------
7>lld-link : error : duplicate symbol: public: bool __cdecl std::ios_base::good(void) const
7>>>> defined at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\xiosbase:290
7>>>> myapp.dir\Debug\myapp_impl.obj
7>>>> defined at MSVCP140D.dll
7>
7>lld-link : error : duplicate symbol: public: int __cdecl std::ios_base::flags(void) const
7>>>> defined at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\xiosbase:321
7>>>> myapp.dir\Debug\myapp_impl.obj
7>>>> defined at MSVCP140D.dll
7>
7>lld-link : error : duplicate symbol: public: __int64 __cdecl std::ios_base::width(void) const
7>>>> defined at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\xiosbase:358
7>>>> myapp.dir\Debug\myapp_impl.obj
7>>>> defined at MSVCP140D.dll
7>
7>lld-link : error : duplicate symbol: public: __int64 __cdecl std::ios_base::width(__int64)
7>>>> defined at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\xiosbase:362
7>>>> myapp.dir\Debug\myapp_impl.obj
7>>>> defined at MSVCP140D.dll
7>
7>lld-link : error : duplicate symbol: public: bool __cdecl std::ios_base::operator bool(void) const
7>>>> defined at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\xiosbase:231
7>>>> myapp.dir\Debug\myapp_impl.obj
7>>>> defined at MSVCP140D.dll
7>
7>lld-link : error : duplicate symbol: public: unsigned __int64 __cdecl std::locale::id::operator unsigned __int64(void)
7>>>> defined at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\xlocale:101
7>>>> myapp.dir\Debug\myapp_impl2.obj
7>>>> defined at MSVCP140D.dll
7>
7>lld-link : error : duplicate symbol: public: bool __cdecl std::codecvt_base::always_noconv(void) const
7>>>> defined at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\xlocale:622
7>>>> myapp.dir\Debug\myapp_impl2.obj
7>>>> defined at MSVCP140D.dll
7>Done building project "myapp.vcxproj" -- FAILED.
```
I don't know how to reproduce this problem with a small example. Can anyone help find the cause? The mentioned functions should be inline, right?

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcl0GL2zoQxz-Nchli5HHsbA4-bJ0GFt6DhZZegyzJtlpZYyR5s_n2Dzlht5Q-trSXTYMhkqwZ_eVfxvlLhGB6p3XNyg-s3K_EHAfy9Xn253b2YtWSOtcPDLcjRH82rodI0M7GKhDTZI0U0ZCDk4kDSCtcv5YW8irjGQfhFAStIQ4aOrKWTineGvdNe9Dekw-suGd8z_g9q_j1WrpbVnxcLx_4sCwWovBRK1bcw6Onr1rG1BzPYpoYNtCQ60w_-0VNurPX7dzDc7WBS5rXtNaqddIAadqiYmmp-bIbDeE8tmTT2DS31sjUaoksHI9SaWkhxKSDFfeGwrEVQV96PZFiePdERjHcgSQX4uuyLxco3RmnFYgITYosm0dPvRcjHIzVgZXNv0Z6CtRF-GLCLCx8irMyxMoGOeIloNMhGHLCsrL50rCy-Uxkl-BPSzffZEWZFYh5ycrGOGlnpVnZPBsKV8244z_TtzzUTBnPymZ5jKxslrGjGSebUfv1jV0lBY_5hu8zZe13c_8MgXHxLQKdFX24KQQF5jeE4Hg0LlabtzCcjIr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