Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specifying toolset version when building boost 1.55 with MSVC 2015

I download boost 1.55, extract it, and run the following:

> bootstrap.bat
cl : Command line warning D9035 : option 'GZ' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'RTC1' instead of 'GZ'
cl : Command line warning D9002 : ignoring unknown option '/MLd'

Bootstrapping is done. To build, run:
...

> b2 --build-type=complete --build-dir=build --toolset=msvc-14.0 stage

However, I get the following error:

error: msvc initialization: parameter 'version' inconsistent
error: no value was specified in earlier initialization
error: an explicit value is specified now

Following the same steps with MSVC 2012, I didn't get that error.

If I do --toolset=msvc instead, then it works. However, the generated files have -vc instead of -vc140, which is what I'd like.

How do I specify the toolset explicitly? Where was it "specified in earlier initialization"?

(The reason I want to do this is I am getting a weird linker error later - saying it's looking for some -vc120 boost library... and I have no idea why. I'm trying to eliminate all the possibilities.)

like image 909
Claudiu Avatar asked Dec 15 '15 15:12

Claudiu


1 Answers

The previously specified version is in project-config.jam:

using msvc ; 

Change it to:

using msvc : 14.0 ;
like image 113
Claudiu Avatar answered Sep 19 '22 06:09

Claudiu