Boost C++ Libraries: Ticket #12266: Visual Studio 2015 Express for Desktop and 64-bit builds https://svn.boost.org/trac10/ticket/12266 <p> When building Boost statically as a set of 64-bit static libraries, I have found that using the "usual" Command Prompt doesn't yield 64-bit objects, but rather 32-bit ones. </p> <p> The build commands I am issuing are: </p> <p> bootstrap.bat b2 toolset=msvc-14.0 address-model=64 link=static --with-thread --with-system --with-regex --with-date_time --with-chrono </p> <p> If I open a "Developer Command Prompt" (equivalent to executing %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\<a class="missing wiki">VsDevCmd</a>.bat"") and then build with the commands above, the libraries generated are 32-bit. </p> <p> If I open a "standard" command prompt (equivalent to %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" x86) and then build with the commands above, the libraries generated are 32-bit. </p> <p> Finally, if I open a "Visual Studio 2015 x86 x64 Cross Tools Command Prompt" (equivalent to %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" x86_amd64) and then build with the commands above, the libraries generated are 64-bit. </p> <p> This is in my opinion a problem because of two reasons: </p> <p> 1) This contradicts the documentation in: <a href="http://www.boost.org/build/doc/html/bbv2/reference/tools.html#bbv2.reference.tools.compiler.msvc">http://www.boost.org/build/doc/html/bbv2/reference/tools.html#bbv2.reference.tools.compiler.msvc</a> where it says: "Configure you compiler as usual. If you provide a path to the compiler explicitly, provide the path to the 32-bit compiler. If you try to specify the path to any of 64-bit compilers, configuration will not work." The usual configuration on Windows is the standard Developer Command Prompt. </p> <p> 2) The build doesn't fail or complain that it cannot generate 64-bit binaries, and instead silently disregards the "address-model=64" option and generates 32-bit binaries. </p> <p> Please note that with other tools (CMake for example) one can build both 32 and 64-bit binaries from a "standard" command prompt (i.e. no need to invoke vcvarsall.bat x86_amd64). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12266 Trac 1.4.3 carles.cufi@… Sat, 11 Jun 2016 21:37:27 GMT <link>https://svn.boost.org/trac10/ticket/12266#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12266#comment:1</guid> <description> <p> Some relevant links that date from a while back, this might not have been fixed: </p> <p> <a class="ext-link" href="http://stackoverflow.com/a/9079872/337201"><span class="icon">​</span>http://stackoverflow.com/a/9079872/337201</a> <a class="ext-link" href="http://boost.2283326.n4.nabble.com/64-bit-with-VS-Express-again-td3044258.html"><span class="icon">​</span>http://boost.2283326.n4.nabble.com/64-bit-with-VS-Express-again-td3044258.html</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>