John Maddock 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
// Std includes ---------------------------------------------------------------
#include <string>
int main(int argc, char* argv[])
{
boost::basic_regex expression(L".*");
boost::match_resultsstd::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