는 다음 코드와 링커 오류가 발생합니다 :std :: regex - 링크가 필요한 라이브러리가 있습니까?
#include <regex>
int main()
{
std::regex rgx("ello");
return 0;
}
test.o: In function `basic_regex':
/usr/lib/gcc/i586-redhat-linux/4.4.1/../../../../include/c++/4.4.1/tr1_impl/regex:769: undefined reference to `std::basic_regex<char, std::regex_traits<char> >::_M_compile()'
collect2: ld returned 1 exit status
http://www.johndcook.com/cpp_regex.html#headernamespace –
std :: tr1이 제 컴파일러에 없습니다. – Scott
내 버전 : gcc 버전 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC) – Scott