Boost logo

Boost Users :

From: Phelps Williams (phelpsw_at_[hidden])
Date: 2008-02-17 18:06:29

I am a first time boost user and I am interested in playing with some of the
regex features. I am forced to compile boost from svn because I'm using ms
visual c++ 9.0. I looked into this process and it appears that no
modifications are necessary for a successful compilation.

With bjam.exe in the boost root directory I execute the following command to

bjam.exe -toolset=msvc debug stage

The compilation completes without any errors and all expected lib and dlls
are present in $BOOST_ROOT\stage\lib as expected.
I then setup a simple regex project to test things out:

#include "stdafx.h"
#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;

Additionally, I have configured my boost root directory as an Additional
Include Directory under Properties -> C/C++ -> General
I have also configured my compiled libraries under (Properties -> Linker ->
General) Additional Library Directories to the location where the compiled
libs were placed. $BOOST_ROOT\stage\lib

During compilation of this project I receive link errors:
LINK : fatal error LNK1104: cannot open file 'libboost_regex-vc90-mt-gd-1

The confusing part is in the stage\lib directory all the libs are titled in
the following format "boost_libname_vc90-mt-gd.lib" or ".dll" For some
reason the libraries are missing the *lib* in front of the name...for
example "libboost_regex-vc90-mt-gd-1_35.lib"

I tried to rename this boost_regex example to libboost_regex but I ran into
runtime exceptions. Specifically that "boost_regex-vc90-mt-gd-1_35.dll" was
not found. I then copied this dll into the Debug folder where the compiled
exe is being executed from and everything executed properly.

Why are the static libraries not named properly? Thanks


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at