Trying out Build on Windows, have questions
After using a bunch of IDEs to compile my trial Boost code on Windows, I'm trying out Boost's included build system. I've been using the directions at http://www.boost.org/doc/libs/1_54_0/more/getting_started/index.html. I'm using a 32-bit Windows 8 Pro laptop. I have the MinGW-Builds version of GCC 4.8.1 installed. I downloaded a copy of Clang 3.3, built with the aforementioned GCC. I also have Visual Studio Express 2012 (v11.0) installed, the Desktop version along with the Metro and Web versions. The copy of Clang is installed into the same directories as GCC, and the "bin" sub-directory is in my PATH. I'm using a Subversion copy of the Boost libraries. Per the Getting Started instructions, I changed to the Boost Subversion directory and ran "bootstrap." I'm using a "user-config.jam" file of: //===== using gcc : 4.8 : : <cxxflags>-std=c++11 ; using msvc : 11.0 : "C:\Program Files\Microsoft Visual Studio 11.0\VC\bin\cl" ; using clang : 3.3 : : <cxxflags>-std=c++11 ; //===== Then I ran ".\b2", and the GCC version of the Boost libraries were built. Then I ran ".\b2 toolset=msvc" for the Visual Studio version. When I tried ".\b2 toolset=clang", it failed miserably since it couldn't find any of the standard headers. Now I've heard that Clang can build for Windows, but actually using it is broken (no matter how it's built). Is there a way to adjust the clang entry in my "user-config.jam" so it gets all the stuff it needs from the GCC installation? I got the sample regex program to build with GCC: //===== C:\Users\Daryle\Documents\Projects>g++ -I ..\Repositories\boost-trunk example2.c pp -o example2 -L ..\Repositories\boost-trunk\stage\lib -lboost_regex-mgw48-mt-1 _55 //===== but not with MSVC: //===== C:\Users\Daryle\Documents\Projects>cl /EHsc /I ..\Repositories\boost-trunk examp le2.cpp /link /LIBPATH:C:\Users\Daryle\Documents\Repositories\boost-trunk\stage \lib Microsoft (R) C/C++ Optimizing Compiler Version 17.00.51106.1 for x86 Copyright (C) Microsoft Corporation. All rights reserved. example2.cpp Microsoft (R) Incremental Linker Version 11.00.51106.1 Copyright (C) Microsoft Corporation. All rights reserved. /out:example2.exe /LIBPATH:C:\Users\Daryle\Documents\Repositories\boost-trunk\stage\lib example2.obj LINK : fatal error LNK1104: cannot open file 'libboost_regex-vc110-mt-s-1_55.lib ' //===== When I looked at the library-storage directory, there were no variants with "-s-". Should I run "b2," which is now in my PATH, again to add the required variants? What options do I need to add to the command line? Daryle W.
AMDG On 08/02/2013 05:46 PM, Daryle Walker wrote:
When I tried ".\b2 toolset=clang", it failed miserably since it couldn't find any of the standard headers. Now I've heard that Clang can build for Windows, but actually using it is broken (no matter how it's built). Is there a way to adjust the clang entry in my "user-config.jam" so it gets all the stuff it needs from the GCC installation?
You'll need <cxxflags>-I... and <linkflags>.... I have no idea what the options actually needed are. It's not automated by Boost.Build.
I got the sample regex program to build with GCC:
<snip> LINK : fatal error LNK1104: cannot open file 'libboost_regex-vc110-mt-s-1_55.lib ' //=====
When I looked at the library-storage directory, there were no variants with "-s-". Should I run "b2," which is now in my PATH, again to add the required variants? What options do I need to add to the command line?
s corresponds to runtime-link=static. In Christ, Steven Watanabe
participants (2)
-
Daryle Walker
-
Steven Watanabe