Community
cancel
Showing results for 
Search instead for 
Did you mean: 
pascal_M_
Beginner
118 Views

Undefined symbols for architecture x86_64: __ZTVNSt3__123__match_any_but_newlineIcEE

I have the following c++ code :

 #include <iostream>
 #include <regex>
  #include <string>

  using namespace std;

  int main()
 {
   string input;
   regex rr("((\\+|-)?[[:digit:]]+)(\\.(([[:digit:]]+)?))?((e|E)((\\+|-)?)[[:digit:]]+)?");
   //As long as the input is correct ask for another number
   while(true)
   {
     cout<<"Give me a real number!"<<endl;
     cin>>input;
     if(!cin) break;
     //Exit when the user inputs q
     if(input=="q")
       break;
     if(regex_match(input,rr))
       cout<<"float"<<endl;
     else
     {
       cout<<"Invalid input"<<endl;
     }
   }
 }

that I compile as follow (m_ccompxe_2013_sp1.4.201) :

/opt/intel/bin/icpc -std=c++11 tst_regex.cpp -o tst_regex

Which throws me the following :

Undefined symbols for architecture x86_64:
  "__ZTVNSt3__123__match_any_but_newlineIcEE", referenced from:
      __ZNSt3__111basic_regexIcNS_12regex_traitsIcEEE12__parse_atomIPKcEET_S7_S7_ in icpc01Hn6D.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64

Any idea ?

0 Kudos
2 Replies
118 Views

Bernard
Black Belt
118 Views

Looks ICE type of error.

It is hard to understand which object's vtable diagnostic message is referencing.

Reply