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.