Link error only with Visual Studio 2017

Claude SIMON's Avatar

Claude SIMON

13 May, 2017 09:33 AM

Hello !

The project builds perfectly with Visual Studio 2013 and 2015, but not with Visual Studio 2017. The build fails with following message : LINK : fatal error LNK1104: cannot open file 'libcpmt.lib' [C:\projects\xppq-cli\xppq.vcxproj].

This project builds perfectly with Visual Studio 2017 on my personal computer.

The project, whose native part roughly contains the same code as the above project, has the same problem, but the project, whose native part also contains roughly the same code, builds perfectly.

Another project,, has exactly the same problem....

I'm rather new to AppVeyor, so perhaps am I missing something obvious, but I can't figure out what...

Thanks !

  1. Support Staff 1 Posted by Ilya Finkelshte... on 15 May, 2017 04:11 PM

    Ilya Finkelshteyn's Avatar

    Hi Claude,

    I forked your repro to look at it. I connected to build worker with RDP and was also able to reproduce this issue manually in RDP as well. Trying to run build from all kinds of developer command prompts did not help ether. However when I agreed to upgrade Windows SDK version and Platform toolset (see attached pic) it started building OK.

    Is your local VS2017 computer where it builds OK is the same computer where VS2015 installed?

    Also please note that xppq-node does not actually being build, it has build: off setting and I am pretty sure that it will fail the same way, if msbuild is called against it.

  2. 2 Posted by Claude SIMON on 17 May, 2017 08:46 AM

    Claude SIMON's Avatar

    Hello, Ilya,

    Thank you very much for your answer ; it helped me to solve the issue.

    The problem was that the Platform toolset in the Visual Sudio project file was hardcoded ; by setting it to $(DefaultPlatformToolset), all the builds are now successful, yet without the need to have a Visual Studio project file per version.

    As you guessed, I have indeed, in addition to the 2017 version, another Visual Studio installation on my computer, although it is the 2013 version, not the 2015, and that's probably why the builds succeed on my computer.

    Regarding the xppq-node project, the build is made by the install script (node-pre-gyp /m build), and that's because it has build: off. And before this command, there is a node-pre-gyp configure, which generates the Visual Studio project file. As it uses the MS tools from the proper Visual Studio version, each generated project file probably contains a suitable Platform Toolset, and that's why all the build were successful, as the test proves it.

  3. Claude SIMON closed this discussion on 17 May, 2017 08:54 AM.

  4. Ilya Finkelshteyn re-opened this discussion on 17 May, 2017 09:12 AM

  5. Support Staff 3 Posted by Ilya Finkelshte... on 17 May, 2017 09:12 AM

    Ilya Finkelshteyn's Avatar

    Thanks a lot for update!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac