jeaye / color_coded

A vim plugin for libclang-based highlighting of C, C++, ObjC
MIT License
870 stars 53 forks source link

:CCerror. Can't compile external library: exception specification of overriding function is more lax than base version #139

Open ghost opened 8 years ago

ghost commented 8 years ago

This is not an issue with color_coded. I am having problems to set up my code's highlighting with an external third party library called libMesh. I can compile this library and in my code directory I have the .color_coded file with the libMesh's include directory. I can't get a proper syntax highlighting in my code, so I typed :CCerror to see the problem:

/Users/salazardetro1/scicomp_libraries/libmesh_install/include/libmesh/libmesh_exceptions.h:125:29: error: expected ';' at end of declaration list /Users/salazardetro1/scicomp_libraries/libmesh_install/include/libmesh/libmesh_exceptions.h:130:24: error: exception specification of overriding function is more lax than base version /Users/salazardetro1/scicomp_libraries/libmesh_install/include/libmesh/libmesh_exceptions.h:130:36: error: expected ';' at end of declaration list /Users/salazardetro1/scicomp_libraries/libmesh_install/include/libmesh/libmesh_exceptions.h:115:5: error: member initializer 'error_code' does not name a non-static data member or base class /Users/salazardetro1/scicomp_libraries/libmesh_install/include/libmesh/libmesh_exceptions.h:118:29: error: use of undeclared identifier 'error_code'

This is the file that is giving problems. I don't know if it's a problem with their file or the way I am configuring my code. I also have YCM and :YcmDiags gives me the same output. Any help would be appreciated.

jeaye commented 8 years ago

It appears as though libmesh_noexcept is not known to the compiler. I'd start by double checking that it's defined appropriately. You can do that with some pre-processor if-checks and a #warning or similar.

ghost commented 8 years ago

Something like this (I'm not very good at C++ yet)? #ifdef libmesh_noexcept #pragma message ("defined") #else #pragma message ("not defined") #endif when compiling my code, I get a compilation warning and the message "defined", when I call :CCerror, I cannot see more errors because I get too many, the ones I showed before plus these:

/Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:309:9: error: no member named 'signbit' in the global namespace /Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:310:9: error: no member named 'fpclassify' in the global namespace /Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:311:9: error: no member named 'isfinite' in the global namespace /Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:312:9: error: no member named 'isinf' in the global namespace /Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:313:9: error: no member named 'isnan' in the global namespace /Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:314:9: error: no member named 'isnormal' in the global namespace /Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:315:9: error: no member named 'isgreater' in the global namespace /Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:316:9: error: no member named 'isgreaterequal' in the global namespace /Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:317:9: error: no member named 'isless' in the global namespace /Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:318:9: error: no member named 'islessequal' in the global namespace /Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:319:9: error: no member named 'islessgreater' in the global namespace /Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:320:9: error: no member named 'isunordered' in the global namespace /Users/salazardetro1/.vim/bundle/color_coded/build/clang+llvm-3.8.0-x86_64-apple-darwin/include/c++/v1/cmath:321:9: error: no member named 'isunordered' in the global namespace

At the end I get fatal error: too many errors emitted, stopping now [-ferror-limit=] How can I modify -ferror-limit= ?

Thanks Miguel