tag:help.appveyor.com,2012-11-13:/discussions/problems/13155-vs2017-versus-vs2015-behavior-different-on-the-cl-compiler-environment-variables-include-libAppVeyor: Discussion 2018-08-25T02:27:40Ztag:help.appveyor.com,2012-11-13:Comment/449394352018-03-21T19:17:37Z2018-03-21T19:17:37ZVS2017 versus VS2015: behavior different on the cl compiler environment variables: INCLUDE, LIB<div><p>From what i can see <a href="https://github.com/Kampbell/poco/tree/8aa104168a5c8b01baf7049d3a468315f07d0692">this earlier commit</a>, in which the mysql project compilation failed, and <a href="https://github.com/Kampbell/poco/tree/1835a7423dc1a1691f49b0a3fef4686c676bb4e1">this later commit</a> both used Visual Studio 2017 image. The only difference being some different environment variables ('vsver' being changed from 150 to 140).<br>
Am I missing something?</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/449394352018-03-21T19:34:02Z2018-03-21T19:34:02ZVS2017 versus VS2015: behavior different on the cl compiler environment variables: INCLUDE, LIB<div><p>Hello</p>
<p>You are right, the only difference is the vsver variable which I<br>
switched between the two commits. May be it could be related to the<br>
MSBuild version... As you can see, the msbuild command is exactly the<br>
same in both jobs...</p>
<p>Le 21/03/2018 à 20:17, Owen McDonnell a écrit :</p></div>zosrothkotag:help.appveyor.com,2012-11-13:Comment/449394352018-03-21T22:17:27Z2018-03-21T22:17:27ZVS2017 versus VS2015: behavior different on the cl compiler environment variables: INCLUDE, LIB<div><p>Yes, msbuild seems to be the same, but i'm wondering about the following difference:<br>
In unsuccessful build...<br></p>
<pre>
<code>C:\projects\poco\buildwin.cmd 150 build shared release Win32 samples tests msbuild env minimal
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.6.2
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'
########################################################################
####
#### STARTING VISUAL STUDIO BUILD (vs150, x86)
####
########################################################################</code>
</pre>
while in successful build,<br>
<pre>
<code>C:\projects\poco\buildwin.cmd 140 build shared release Win32 samples tests msbuild env minimal
########################################################################
####
#### STARTING VISUAL STUDIO BUILD (vs140, Win32)
####
########################################################################</code>
</pre>
Based on a look at your 'buildwin.cmd' script i'm not sure how the platform was set to 'x86' instead of 'win32'.<br>
Any ideas?</div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/449394352018-03-22T10:28:11Z2018-03-22T10:36:24ZVS2017 versus VS2015: behavior different on the cl compiler environment variables: INCLUDE, LIB<div><p>In fact the 'x86' versus 'Win32' is just a bug in the display. But both msduild command are identical with the same value for the parameter /p:Platform: /p:Platform=Win32<br></p>
<pre>
<code>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++ Building [MySQL_vs150.vcxproj]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
msbuild /clp:NoSummary /nologo /v:minimal /logger:"C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:UseEnv=true /m /t:build /p:Configuration=release_shared /p:Platform=Win32 MySQL_vs150.vcxproj
Vcpkg is unable to link because we cannot decide between Release and Debug libraries. Please define the property VcpkgConfiguration to be 'Release' or 'Debug' (currently 'release_shared').
Binder.cpp
c:\projects\poco\sql\mysql\include\poco\sql\mysql\binder.h(24): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory [C:\projects\poco\SQL\MySQL\MySQL_vs150.vcxproj]
Connector.cpp
c:\projects\poco\sql\mysql\include\poco\sql\mysql\sessionhandle.h(20): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory [C:\projects\poco\SQL\MySQL\MySQL_vs150.vcxproj]
Extractor.cpp<br> <code>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++ Building [MySQL_vs140.vcxproj]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
msbuild /clp:NoSummary /nologo /v:minimal /logger:&quot;C:\Progra~1\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll&quot; /p:UseEnv=true /m /t:build /p:Configuration=release_shared /p:Platform=Win32 MySQL_vs140.vcxproj
Vcpkg is unable to link because we cannot decide between Release and Debug libraries. Please define the property VcpkgConfiguration to be &#39;Release&#39; or &#39;Debug&#39; (currently &#39;release_shared&#39;).
Binder.cpp
Connector.cpp
Extractor.cpp</code><br><br>
<br>Moreover, the 2 MySQL.vcxproj file are identical except for the ToolsVersion(14.0/15.0) and the <PlatformToolset>(140/141)</code>
</pre></div>zosrothkotag:help.appveyor.com,2012-11-13:Comment/449394352018-03-22T19:17:41Z2018-03-22T19:17:41ZVS2017 versus VS2015: behavior different on the cl compiler environment variables: INCLUDE, LIB<div><p>In the unsuccessful build I referenced the environment vcvars seem to get initialized while in the successful ones they don't... is this section of the 'buildwin.cmd' working as intended?<br></p>
<pre>
<code>if "%1"=="" goto usage
set VS_VERSION=vs%1
if %VS_VERSION%==vs150 (
if "%VS150COMNTOOLS%"=="" (
set VS150COMNTOOLS=C:\Program Files ^(x86^)\Microsoft Visual Studio\2017\Community\Common7\Tools\
)
set VS_VARSALL=....\VC\Auxiliary\Build\vcvarsall.bat
) else (
set VS_VARSALL=....\VC\vcvarsall.bat
)</code>
</pre></div>Owen McDonnell