Boost link error when using "--layout=system" on VS2005
- by Kevin
I'm new to boost, and thought I'd try it out with some realistic deployment scenarios for the .dlls, so I used the following command to compile/install the libraries:
.\bjam install --layout=system variant=debug runtime-link=shared link=shared
--with-date_time --with-thread --with-regex --with-filesystem
--includedir=<my include directory> --libdir=<my bin directory> > installlog.txt
That seemed to work, but my simple program (taken right from the "Getting Started" page) fails:
#include <boost/regex.hpp>
#include <iostream>
#include <string>
// Place your functions after this line
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;
}
}
This fails with the following linker error:
fatal error LNK1104: cannot open file 'libboost_regex-vc80-mt-1_42.lib'
I'm sure that both the .lib and the .dlls are in that directory, and named how I want them to be (ie: boost_regex.lib, etc, all unversioned, as the --layout=system says). So why is it looking for the versioned type of it? And how do I get it to look for the unversioned type of the library?
I've tried this with more "normal" options, such as below:
.\bjam stage --build-type=complete --with-date_time --with-thread --with-filesystem --with-regex > mybuildlog.txt
And that works fine. I made sure my compiler saw the "stage\lib" directory, and it compiled and ran fine with nothing beyond having the environment looking into the right lib directory. But when I took those "testing" directories away, and wanted to use these others (unversioned), then it failed.
I'm under VS2005 here on XP. Any ideas?