I use boost 1.61.0 with cl 19 (visual studio 2015). I built boost libraries from getting start documentation with command line bootstrap
and .\b2
. This made stage directory with some vc14 prefix libraries.
But when I tried to compile getting start regex program
#include <boost/regex.hpp>
#include <iostream>
#include <string>
int main()
{
std::string line;
boost::regex pat( "^Subject: (Re: |Aw: )*(.*)" );
while (std::cin)
{
std::getline(std::cin, line);
boost::smatch matches;
if (boost::regex_match(line, matches, pat))
std::cout << matches[2] << std::endl;
}
}
with this command line compiler settings:
cl main.cpp -I %BOOST_ROOT% -L %BOOST_LIB_14% /EHsc
I get this error:
Link:: fatal error LNK1181: cannot open input file 'C:\local\boost_1_61_0\stage\lib.obj
What is wrong with my try?
EDIT: I changed command line compile to:
cl main.cpp /I %BOOST_ROOT% /link /LIBPATH:%BOOST_LIB_14% /EHsc
Now, I get this error:
LINK: fatal error LNK1104: cannot open file 'libbosst_regex-vc140-mt-s-1_61.lib'