Reputation: 1
I am in the process of upgrading a big boost-intensive program to VS2015, and boost 1.61. The program is a 64-bit program - x64
Boost seems to look for the wrong libraries in 64-bit mode (Or more likely I did something stupid). I believe I have built the correct boost libraries for the VS2015 platform.
I tried from scratch making a tiny boost function in WIN32 mode, that requires static linking. This works fine......
#include <boost/regex.hpp>
#include <iostream>
#include <string>
void test()
{
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;
}
}
But when I want to compile this in x64 boost complains. Yes I have set the #include and link path correctly for both platforms. The libraries are not there.
1>LINK : fatal error LNK1104: cannot open file 'libboost_regex-vc140-mt-gd-1_61.lib'
libboost_regex-vc140-mt-1_61.lib
Upvotes: 0
Views: 1121
Reputation: 3059
You need to build the correct set of libraries the compiler is asking for. You should consult the library naming chart to get the build arguments (i.e. properties) to use while building. In your case it's looking for libraries tagged as "lib--mt-gd-1_61.lib". Which reading the chart says you would need to build with:
link=static threading=multi runtime-debugging=on variant=debug
Upvotes: 0
Reputation: 12425
Upvotes: 0