(struct boost::regex_traits_wrapper > const
&,enum boost::regex_constants::error_type)"
(??$raise_error@U?$regex_traits_wrapper@U?$regex_traits@DV?$w32_regex_tr
aits@D@boost@@@boost@@@boost@@@re_detail@boost@@YAXABU?$regex_traits_wra
Hi All,
Is there a known issue of linker errors with using boost::regex library
with STLport.
If I don't install STLport I am able to build regex however I am getting
linker error while trying to build after installing STLPort.
Operating System:Win-XP
IDE: Visual Studio .NET(version 7.1.3088)
STLPort version: STLport-4.6.2
Boost versio:boost_1_33_1
The code which I have used in sample project:
#include "stdafx.h"
#include
#include <iostream>
#include <string>
int _tmain(int argc, _TCHAR* argv[])
{
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];
}
return 0;
}
I got following linker errors:
ConsoleApp1.obj : error LNK2019: unresolved external symbol "void
__cdecl boost::re_detail::raise_runtime_error(class _STL::runtime_error
const &)"
(?raise_runtime_error@re_detail@boost@@YAXABVruntime_error@_STL@@@Z)
referenced in function "void __cdecl
boost::re_detail::raise_error >
pper@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@1@W4error_ty
pe@regex_constants@1@@Z)
ConsoleApp1.obj : error LNK2019: unresolved external symbol "class
_STL::basic_string __cdecl boost::re_detail::w32_transform(unsigned
long,char const *,char const *)"
(?w32_transform@re_detail@boost@@YA?AV?$basic_string@DV?$char_traits@D@_
STL@@V?$allocator@D@2@@_STL@@KPBD0@Z) referenced in function "public:
class _STL::basic_string __thiscall
boost::w32_regex_traits<char>::transform(char const *,char const *)const
"
(?transform@?$w32_regex_traits@D@boost@@QBE?AV?$basic_string@DV?$char_tr
aits@D@_STL@@V?$allocator@D@2@@_STL@@PBD0@Z)
Debug/ConsoleApp1.exe : fatal error LNK1120: 2 unresolved externals
However if I comment call to function boost::regex_match() in sample
code , then I am able to build it.
Regards:
Vijay Kumar