lundi 26 mars 2018

Compilation errors when including

I've been trying to compile the Catch2 header as part of a larger existing project where I used to rely on googletest. I've been able to get the port working nicely on Windows, but I'm struggling to get the library compiled on Ubuntu using Clang. I've tested versions 3.5 through 3.7.

I've included the errors generated at compile time:

In file included from /usr/local/include/catch/catch.hpp:7932:
In file included from /usr/bin/../lib/gcc/x86_64-linux-
gnu/5.4.0/../../../../include/c++/5.4.0/regex:61:
In file included from /usr/bin/../lib/gcc/x86_64-linux-
gnu/5.4.0/../../../../include/c++/5.4.0/bits/regex.h:2796:
/usr/bin/../lib/gcc/x86_64-linux-
gnu/5.4.0/../../../../include/c++/5.4.0/bits/regex.tcc:102:16: error: 
expected unqualified-id
          auto& __pre = __m._M_prefix();
                  ^
/usr/bin/../lib/gcc/x86_64-linux-
gnu/5.4.0/../../../../include/c++/5.4.0/bits/regex.tcc:106:13: error: 
expected expression
              __pre.matched = false;
                   ^
/usr/bin/../lib/gcc/x86_64-linux-
gnu/5.4.0/../../../../include/c++/5.4.0/bits/regex.tcc:107:13: error: 
expected expression
              __pre.first = __s;
                   ^
/usr/bin/../lib/gcc/x86_64-linux-
gnu/5.4.0/../../../../include/c++/5.4.0/bits/regex.tcc:108:13: error: 
expected expression
              __pre.second = __s;
                   ^
/usr/bin/../lib/gcc/x86_64-linux-
gnu/5.4.0/../../../../include/c++/5.4.0/bits/regex.tcc:115:13: error: 
expected expression
              __pre.first = __s;
                   ^
/usr/bin/../lib/gcc/x86_64-linux-
gnu/5.4.0/../../../../include/c++/5.4.0/bits/regex.tcc:116:13: error: 
expected expression
              __pre.second = __res[0].first;
                   ^
/usr/bin/../lib/gcc/x86_64-linux-
gnu/5.4.0/../../../../include/c++/5.4.0/bits/regex.tcc:117:13: error: 
expected expression
              __pre.matched = (__pre.first != __pre.second);
                   ^
7 errors generated.

Let me know if there is any additional information I can include to help narrow down the issue. Any help would be greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire