Boost logo

Boost Users :

From: Klaus Nowikow (nowikow_at_[hidden])
Date: 2005-03-16 10:16:49


John Maddock <john <at> johnmaddock.co.uk> writes:

>
> > when I define the symbol BOOST_DYN_LINK (in my project settings) I get
> > the following linker errors in MSVC 7.1:

[snip]

> > When linking Boost.Regex statically, everything is ok.
> > I am using /Zc:wchar_t ("Treat wchar_t as Built-in type") in my
> > project settings.
> >
> > Any ideas what's going wrong?
>
> Not really: I've checked and those symbols are exported, and your setup is
> one we regularly test. Are you able to produce a short test case?

Yes. I am not familiar with Boost.Test, so I just wrote a small test program:

<code>
// Boost includes -------------------------------------------------------------
#define BOOST_DYN_LINK
#include <boost/regex.hpp>

// Std includes ---------------------------------------------------------------
#include <string>

int main(int argc, char* argv[])
{
    boost::basic_regex<wchar_t> expression(L".*");
    boost::match_results<std::wstring::const_iterator> result;

    boost::regex_match(
        std::wstring(L"Test"),
        result,
        expression,
        boost::match_default |
        boost::match_not_dot_newline |
        boost::match_any
        );

    return 0;
}
</code>

My project settings are:
- Runtime Lib: Multithreaded-DLL (/MD)
- Treat wchar_t as built-in type on (/Zc:wchar_t)
- Enable run-time type info on (/GR)

MSVC 7.1, Boost Version 1.32.0

I picked only the ones that look relevant to me. If you need more information,
please just drop me a note. Anyways, changing the latter two didn't have any
effect, and changing the first "is a bad idea".

> Thanks,
>
> John.

Thank you.

Klaus


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net