# How can I resolve this ERROR ? Linker 1120 unresolved externals

**URL:** <https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66>\
**Category:** Windows\
**Created:** [26 April 2020 10:33 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66 "2020-04-26T10:33:36Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![einfachfelix](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@einfachfelix](https://iplug2.discourse.group/u/einfachfelix)\
**Post date:** [26 April 2020 10:33 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/1 "2020-04-26T10:33:36Z")

</div>

Hi Oli,  
I´m new to IPlug - tried downloading it yesterday. I get the following error when building it:

Creating library C:\iPlug2-master\Examples\MyNewPlugin\build-win\vst3\Win32\Debug\int\MyNewPlugin.lib and object C:\iPlug2-master\Examples\MyNewPlugin\build-win\vst3\Win32\Debug\int\MyNewPlugin.exp  
1\>ITextEntryControl.obj : error LNK2001: unresolved external symbol “public: static class std::locale::id std::codecvt\<char16\_t,char,struct \_Mbstatet\>::id” (?id@?$codecvt@\_SDU\_Mbstatet@@@std@@2V0locale@2@A)  
1\>C:\iPlug2-master\Examples\MyNewPlugin\build-win\vst3\Win32\Debug\MyNewPlugin.vst3 : fatal error LNK1120: 1 unresolved externals  
1\>Done building project “MyNewPlugin-vst3.vcxproj” – FAILED.

I tried going back a couple of versions (16 days ago - before ITextEntryControl changes ).  
Tried the commits before Apr 9, 2020 - same Error.

I use the latest version of windows 10 and the latest version of visual studio 2019.  
I installed the dependecies according to the readme.md …

what am i doing wrong :O?

---

<div class="post-metadata">

**Author:** ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)\
**Post date:** [26 April 2020 10:59 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/2 "2020-04-26T10:59:51Z")

</div>

@vasyan also had this error.

Does it happen if you build the x64 version?

I am going to modify the ITextEntryControl not to use std::codecvt, which I hope will fix the issue

---

<div class="post-metadata">

**Author:** ![einfachfelix](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@einfachfelix](https://iplug2.discourse.group/u/einfachfelix)\
**Post date:** [26 April 2020 11:26 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/3 "2020-04-26T11:26:44Z")

</div>

unfortunately yes - it also happens if i set it to x64.

---

<div class="post-metadata">

**Author:** ![vasyan](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/vasyan/32/82_2.png) [@vasyan](https://iplug2.discourse.group/u/vasyan)\
**Post date:** [26 April 2020 12:51 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/4 "2020-04-26T12:51:08Z")

</div>

It is necessary to solve this problem.

---

<div class="post-metadata">

**Author:** ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)\
**Post date:** [27 April 2020 12:32 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/5 "2020-04-27T12:32:38Z")

</div>

> [@einfachfelix](#):
>
> unresolved external symbol “public: static class std::locale::id std::codecvt\<char16\_t,char,struct \_Mbstatet\>::id

This seems like a long established MSVC bug

[https://social.msdn.microsoft.com/Forums/en-US/8f40dcd8-c67f-4eba-9134-a19b9178e481/vs-2015-rc-linker-stdcodecvt-error?forum=vcgeneral](https://social.msdn.microsoft.com/Forums/en-US/8f40dcd8-c67f-4eba-9134-a19b9178e481/vs-2015-rc-linker-stdcodecvt-error?forum=vcgeneral)

but I don’t know why it works on my machine.

What Windows SDK do you have installed? You can check in the “property pages”

I have 10.0.18362.0

 ![msvc](https://global.discourse-cdn.com/free1/uploads/iplug2/original/1X/872eb30745de93a2223c9b32a5dfa97b4b11a319.gif)

---

<div class="post-metadata">

**Author:** ![vasyan](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/vasyan/32/82_2.png) [@vasyan](https://iplug2.discourse.group/u/vasyan)\
**Post date:** [27 April 2020 12:39 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/6 "2020-04-27T12:39:18Z")

</div>

> [@olilarkin](#):
>
> What Windows SDK do you have installed? You can check in the “property pages”
> 
> I have 10.0.18362.0

I have 10.0.17763.0 🤐

---

<div class="post-metadata">

**Author:** ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)\
**Post date:** [27 April 2020 14:02 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/7 "2020-04-27T14:02:47Z")

</div>

could you try upgrading? see if it makes a difference

---

<div class="post-metadata">

**Author:** ![vasyan](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/vasyan/32/82_2.png) [@vasyan](https://iplug2.discourse.group/u/vasyan)\
**Post date:** [28 April 2020 05:18 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/8 "2020-04-28T05:18:08Z")

</div>

I installed the SDK version 10.0.18362.0, however this error did not disappear. Apparently the matter is different.

---

<div class="post-metadata">

**Author:** ![asedev](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@asedev](https://iplug2.discourse.group/u/asedev)\
**Post date:** [28 April 2020 07:15 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/9 "2020-04-28T07:15:58Z")

</div>

> [@einfachfelix](#):
>
> error LNK2001: unresolved external symbol “public: static class std::locale::id std::codecvt

Please try this fix to see if it helps: [stl - Visual Studio C++ 2015 std::codecvt with char16\_t or char32\_t - Stack Overflow](https://stackoverflow.com/questions/32055357/visual-studio-c-2015-stdcodecvt-with-char16-t-or-char32-t)

---

<div class="post-metadata">

**Author:** ![asedev](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@asedev](https://iplug2.discourse.group/u/asedev)\
**Post date:** [28 April 2020 07:18 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/10 "2020-04-28T07:18:55Z")

</div>

And make sure to use the latest Visual Studio version 16.5.4.

---

<div class="post-metadata">

**Author:** ![vasyan](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/vasyan/32/82_2.png) [@vasyan](https://iplug2.discourse.group/u/vasyan)\
**Post date:** [29 April 2020 17:58 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/11 "2020-04-29T17:58:19Z")

</div>

This is not an option to arrange a race to upgrade Visual Studio. You need to write code so that it works on not very recent versions. Or at least make the code work both there and there. Nothing personal, just good manners in programming. 😀

---

<div class="post-metadata">

**Author:** ![asedev](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@asedev](https://iplug2.discourse.group/u/asedev)\
**Post date:** [29 April 2020 18:39 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/12 "2020-04-29T18:39:03Z")

</div>

In general i can agree. But since this is somewhat a bug in VStudio it is OK to either live with it and use the workaround from the link above. Or update VStudio to a recent version, or in this case at least v16.2 which is already pretty old.

Due to this and since Oli nor I do not get this error in our dev environments it should not be a matter of the iPlug2 library to make it work in all cases. Otherwise I would actually opt for iPlug2 being useable in my old VC++ 6.0 release (running in a Win2000 virtual machine) which is so damn fast.

---

<div class="post-metadata">

**Author:** ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)\
**Post date:** [29 April 2020 22:01 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/13 "2020-04-29T22:01:37Z")

</div>

I have tried on 3 different Windows, some with old VS2019 / SDK and they all work fine with iPlug2 tip.

@einfachfelix and @vasyan please could you try some of the solutions in the link @asedev posted?

Do all examples/formats fail to build with the same error?

---

<div class="post-metadata">

**Author:** ![einfachfelix](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@einfachfelix](https://iplug2.discourse.group/u/einfachfelix)\
**Post date:** [3 May 2020 11:02 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/14 "2020-05-03T11:02:40Z")

</div>

ok this is my unpleasant reply:  
I tried to do what the people wrote on stackoverflow, but i´m a noob in c++ so didn´t understand the first solution.(i really just started to learn it) So I just copied:  
#include \< locale \>

#if (!\_DLL) && (\_MSC\_VER \>= 1900 /\* VS 2015\*/) && (\_MSC\_VER \<= 1911 /\* VS 2017 \*/)  
std::locale::id std::codecvt\<char16\_t, char, \_Mbstatet\>::id;  
#endif

and the plugin builds now (yay) and i can run it in a daw but i get the following error:

Severity Code Description Project File Line Suppression State  
Error MSB3073 The command “CALL “C:\iPlug2-master\Examples\MyNewPlugin\scripts\postbuild-win.bat” “.vst3” “MyNewPlugin” “Win32” “1” “C:\iPlug2-master\Examples\MyNewPlugin\build-win\vst3\Win32\Debug\MyNewPlugin.vst3” “C:\Program Files (x86)\VstPlugins” “C:\Program Files\VstPlugins” “C:\Program Files (x86)\Common Files\VST3” “C:\Program Files\Common Files\VST3” “C:\Program Files (x86)\Common Files\Avid\Audio\Plug-Ins” “C:\Program Files\Common Files\Avid\Audio\Plug-Ins” “C:\iPlug2-master\Examples\MyNewPlugin\build-win” “C:\iPlug2-master\Examples\MyNewPlugin\projects…\Dependencies\IPlug\VST3\_SDK\doc\artwork\VST\_Logo\_Steinberg.ico” “C:\iPlug2-master\Examples\MyNewPlugin\projects…\Dependencies\IPlug\AAX\_SDK\Utilities\PlugIn.ico” “C:\iPlug2-master\Examples\MyNewPlugin\projects…\Scripts\create\_bundle.bat”  
:VCEnd” exited with code 4. MyNewPlugin-vst3 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 138

---

<div class="post-metadata">

**Author:** ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)\
**Post date:** [3 May 2020 11:28 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/15 "2020-05-03T11:28:21Z")

</div>

Thanks for trying this

The error you are seeing now is coming from the post-build script - it is not related to the same thing. This is good news. It probably means there is a permissions problem copying the plug-in binary to your VST3 or VST2 folders.

---

<div class="post-metadata">

**Author:** ![einfachfelix](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@einfachfelix](https://iplug2.discourse.group/u/einfachfelix)\
**Post date:** [6 May 2020 10:15 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/16 "2020-05-06T10:15:50Z")

</div>

yes you were right i just have to run Visual Studio as Admin

---

<div class="post-metadata">

**Author:** ![AlexHarker](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@AlexHarker](https://iplug2.discourse.group/u/AlexHarker)\
**Post date:** [8 May 2020 12:26 UTC](https://iplug2.discourse.group/t/how-can-i-resolve-this-error-linker-1120-unresolved-externals/66/17 "2020-05-08T12:26:00Z")

</div>

OK - I’ve added what I think is a correct workaround (a little like the one above, but a little more safe for different versions - checking first that we appear to be in VS and then trying to get the right versions as I am on a later version of VS with the bug but not included in the versions above).

This means:

A - you don’t need to make your own workarounds  
B - if you have they might conflict and you should remove them from your code
