tag:help.appveyor.com,2012-11-13:/discussions/problems/10874-shguidsobj-from-uuidlib-wrong-version-help-me-troubleshoot-this-linker-errorAppVeyor: Discussion 2018-08-25T02:26:13Ztag:help.appveyor.com,2012-11-13:Comment/444414882018-01-04T21:23:30Z2018-01-04T21:23:31Zshguids.obj (from uuid.lib) wrong version? help me troubleshoot this linker error<div><p>First off, I love AppVeyor. Thank you for this amazing service which I am using to test the Zig programming language.</p>
<p>I'm getting a link error on AppVeyor that I'm not getting on my Windows laptop. Could you help?</p>
<p>Here's an example build: <a href="https://ci.appveyor.com/project/andrewrk/zig-d3l86/build/1.0.742">https://ci.appveyor.com/project/andrewrk/zig-d3l86/build/1.0.742</a></p>
<p>The error is:<br>
lld: error: unknown file type: d:\rs1.obj.amd64fre\shell\published\uuid\objfre\amd64\shguids.obj</p>
<p>I'm guessing that shguids.obj came from uuid.lib, which is one of the system dependencies of the executable I'm trying to link (which is the zig self hosted compiler). I'm further guessing that "unknown file type" means that there are multiple uuid.lib files in the appveyor environment and somehow the linker is picking up the wrong version.</p>
<p>Do you have any more information about this or suggestions on how to resolve? As a reminder this problem does not occur on my Windows laptop, so I think there is something funky going on in the AppVeyor environment.</p></div>Andrew Kelleytag:help.appveyor.com,2012-11-13:Comment/444414882018-01-04T21:35:01Z2018-01-04T21:35:02Zshguids.obj (from uuid.lib) wrong version? help me troubleshoot this linker error<div><p>On my laptop I see:</p>
<p>C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64\Uuid.lib<br>
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64\Uuid.lib</p>
<p>I suppose I can push commits to the project to print debug info of finding this uuid.lib file, so that I can find out what the paths are in appveyor.</p></div>Andrew Kelleytag:help.appveyor.com,2012-11-13:Comment/444414882018-01-05T17:29:32Z2018-01-05T17:29:33Zshguids.obj (from uuid.lib) wrong version? help me troubleshoot this linker error<div><p>I figured it out.</p>
<p>Microsoft accidentally released Windows SDK 10.0.26624.0 as version 10.0.10240.0.<br>
<a href="https://developer.microsoft.com/en-us/windows/downloads/sdk-archive">https://developer.microsoft.com/en-us/windows/downloads/sdk-archive</a></p>
<p>On my laptop I compiled LLVM+clang 5.0.1 with this Windows SDK, and provided it to appveyor as a cached .tar.xz.</p>
<p>On appveyor, zig looked for the most recent Windows SDK by comparing version numbers. Because both Windows 10 SDK 10.0.14393 and Windows 10 SDK 10.0.10240 are installed on AppVeyor, Zig found 10.0.14393 as the latest instead of 10240 as the latest, because of the version mixup.</p>
<p>So I added a workaround to detect this particular version of the Windows SDK:<br>
<a href="https://github.com/zig-lang/zig/commit/2c35e24bd95fa8ad9af1c6a712293163232a8b3c">https://github.com/zig-lang/zig/commit/2c35e24bd95fa8ad9af1c6a71229...</a></p>
<p>Now we have a passing build! <a href="https://ci.appveyor.com/project/andrewrk/zig-d3l86/build/0.1.1.2c35e24b">https://ci.appveyor.com/project/andrewrk/zig-d3l86/build/0.1.1.2c35...</a></p></div>Andrew Kelleytag:help.appveyor.com,2012-11-13:Comment/444414882018-01-05T20:40:17Z2018-01-05T20:40:17Zshguids.obj (from uuid.lib) wrong version? help me troubleshoot this linker error<div><p>Thanks a lot for the update!</p></div>Ilya Finkelshteyn