Link error only with Visual Studio 2017
Hello !
The https://ci.appveyor.com/project/epeios-q37/xppq-cli 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 https://ci.appveyor.com/project/epeios-q37/xppq-java project, whose native part roughly contains the same code as the above project, has the same problem, but the https://ci.appveyor.com/project/epeios-q37/xppq-node project, whose native part also contains roughly the same code, builds perfectly.
Another project, https://ci.appveyor.com/project/epeios-q37/esketch-cli, 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 !
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by Ilya Finkelshte... on 15 May, 2017 04:11 PM
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 hasbuild: off
setting and I am pretty sure that it will fail the same way, if msbuild is called against it.2 Posted by Claude SIMON on 17 May, 2017 08:46 AM
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 hasbuild: off
. And before this command, there is anode-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.Claude SIMON closed this discussion on 17 May, 2017 08:54 AM.
Ilya Finkelshteyn re-opened this discussion on 17 May, 2017 09:12 AM
Support Staff 3 Posted by Ilya Finkelshte... on 17 May, 2017 09:12 AM
Thanks a lot for update!