I have installed re2 in ubuntu. I want to use it in my C++ project. the simple code is as follows:
#include <iostream>
#include <re2/re2.h>
using namespace re2;
using namespace std;
int main()
{
string s,t;
if(RE2::FullMatch("hello", "h.*o"))
cout << "s:"<< s << " t:"<< t ;
else
cout << "Not match." ;
return 0;
}
but I got this error:
In function bool re2::RE2::FullMatch<>(absl::string_view, re2::RE2 const&)': main2.cpp: undefined reference to `re2::RE2::FullMatchN(absl::string_view, re2::RE2 const&, re2::RE2::Arg const* const*, int)
Can anyone help me ?