junaidiiith / Apertium_Code

0 stars 0 forks source link

reformatter doesn't compile #3

Open unhammer opened 8 years ago

unhammer commented 8 years ago
$ g++ reformatter.cpp  -I/usr/include/libxml2 -lxml2 -o reformatter 
reformatter.cpp:61:39: error: ‘>>’ should be ‘> >’ within a nested template argument list
 void print_stack(stack<pair<string,int>> &mystack , string tags,int flag)
                                       ^
reformatter.cpp: In function ‘void print_stack(std::stack<std::pair<std::__cxx11::basic_string<char>, int> >&, std::__cxx11::string, int)’:
reformatter.cpp:64:23: error: ‘>>’ should be ‘> >’ within a nested template argument list
  stack<pair<string,int>> temp;
                       ^
reformatter.cpp:75:20: error: ‘stoi’ was not declared in this scope
    int ind = stoi(t);
                    ^
reformatter.cpp:99:52: error: ‘stoi’ was not declared in this scope
     int ind = stoi(tags.substr(pos-1,tags.length()));
                                                    ^
reformatter.cpp:120:49: error: ‘stoi’ was not declared in this scope
    int ind = stoi(tag.substr(pos-1,tag.length()));
                                                 ^
reformatter.cpp:140:26: error: ‘>>’ should be ‘> >’ within a nested template argument list
     stack<pair<string,int>> myss;
                          ^
reformatter.cpp: In function ‘int main(int, char**)’:
reformatter.cpp:203:22: error: ‘stoi’ was not declared in this scope
   int num = stoi(line);
                      ^
reformatter.cpp:218:23: error: ‘>>’ should be ‘> >’ within a nested template argument list
  stack<pair<string,int>> mystack;
                       ^
reformatter.cpp:271:52: error: ‘stoi’ was not declared in this scope
       int ind = stoi(tag.substr(pos-1,tag.length()));

If you're using C++11, (I think >> in templates requires C++11), you should note so in the README.

Could you include a Makefile?

unhammer commented 8 years ago

ah, now I see you included --stdlib in the below command. But please just put it in a makefile, much easier to test :)