Unresolved external symbol linker error in Visual Studio 2015
<p>I am not new to Visual Studio and I know there are many questions on this. But I really cannot figure this out. This is the error:</p>

<pre><code>1&gt;moc_displaycounter.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const Counter::staticMetaObject" (?staticMetaObject@Counter@@2UQMetaObject@@B)
1&gt;moc_displaymanometer.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const ManoMeter::staticMetaObject" (?staticMetaObject@ManoMeter@@2UQMetaObject@@B)
1&gt;moc_displaysvgmeter.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const SVGMeter::staticMetaObject" (?staticMetaObject@SVGMeter@@2UQMetaObject@@B)
</code></pre>

<p>So I did a dumpbin /EXPORTS on the import library and it returned this:</p>

<pre><code>Microsoft (R) COFF/PE Dumper Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Dump of file analogwidgets.lib

File Type: LIBRARY

     Exports

       ordinal    name

                  ??0AbstractMeter@@QEAA@PEAVQWidget@@@Z (public: __cdecl AbstractMeter::AbstractMeter(class QWidget *))
                  ?staticMetaObject@Counter@@2UQMetaObject@@B (public: static struct QMetaObject const Counter::staticMetaObject)
                  ?staticMetaObject@Item@@2UQMetaObject@@B (public: static struct QMetaObject const Item::staticMetaObject)
                  ?staticMetaObject@Led@@2UQMetaObject@@B (public: static struct QMetaObject const Led::staticMetaObject)
                  ?staticMetaObject@ManoMeter@@2UQMetaObject@@B (public: static struct QMetaObject const ManoMeter::staticMetaObject)
                  ?staticMetaObject@PotentioMeter@@2UQMetaObject@@B (public: static struct QMetaObject const PotentioMeter::staticMetaObject)
                  ?staticMetaObject@SVGMeter@@2UQMetaObject@@B (public: static struct QMetaObject const SVGMeter::staticMetaObject)
</code></pre>

<p>I checked the exact signature on the import library. For a good measure, I used <em>depends</em> to check that these symbols were in the DLL (yes I know it doesn't play a part in the linking process, but just to ensure that the import library is not broken), but still it won't link. Tried with both debug and release x64 builds without success. Previously did not have problems with other versions of VS.</p>

<p>Any ideas on what I should do next?</p>