0

I unzipped Boost library in

C:\boost

and ran

bootstrap.bat
b2.exe install

via Visual Studio 2017's Developer Command Prompt.

It created two folders for me:

C:\boost\include
C:\boost\lib

Which I added to

VC++ Directories > Include Directories
Linker > General > Additional Library Directories

Respectively.

Now, building the following code:

#define _WIN32_WINDOWS 0x0501
#define _WINSOCK_DEPRECATED_NO_WARNINGS

#include <boost/asio.hpp>

int main()
{
    return 0;
}

Produces the following error:

1>main.cpp
1>Unknown compiler version - please run the configure tests and report the results
1>LINK : fatal error LNK1104: cannot open file 'libboost_system-vc120-mt-gd-1_55.lib'

It is surprising for me that VC++ looks for libboost_system-vc120-mt-gd-1_55.lib while the built lib files are:

libboost_system-vc-mt-1_55.lib
libboost_system-vc-mt-gd-1_55.lib

Which is missing a number. Is it related to the warnings poping up during building of Boost?

Unknown compiler version - please run the configure tests and report the results


Update:

Please do not link this question to here. The path is correct as I have run b2.exe with install switch. In addition, the option ( C++ → General → Additional Include Directories parameter) is related to old visual Studio IDE. I know it is very stupid to explain such basics. But unfortunately, I see a strong insist on such a linking.

Update:

It is a shame that a gang of users mark this question as a duplicate by linking to a wrong question while they know they are wrong. If you make a mistake, do not insist on it.

Community
  • 1
  • 1
uqla
  • 41
  • 1
  • 3
  • 2
    Perhaps it's a better idea to use [latest boost 1.64](http://www.boost.org/users/download/) – Pavel P May 17 '17 at 02:24
  • @KenWhite, The path I have picked is absolutely correct. The other path generates the same error. – uqla May 17 '17 at 02:30
  • @KenWhite, Have you worked with C++ at all? – uqla May 17 '17 at 02:38
  • 1
    It's a shame that you insist on ranting instead of giving a clear technical description why this duplicate doesn't apply here. If you want to be treated with respect here, try to show that respect to those people that make up this community. – GhostCat May 18 '17 at 03:49

1 Answers1

3

Yes most likely this is related. Boost build is unable to determine Visual Studio compiler version, so it is writing generalized lib names like libboost_system-vc-mt-1_55.lib. Header is trying to use last known version of Visual Studio, for the Boost 1.55 (which is VS2013 or vs120). Try using last version of the boost, it should support VS2017.

Ari0nhh
  • 5,720
  • 3
  • 28
  • 33