Error emitted by the compiler, that prevents program execution. A compile warning starts program execution anyway.
- ::swprintf has not been declared
- _algo.c: Call to undefined function 'rand'
- _algo.c: Cannot modify a const object
- _algobase.h: Cannot convert 'const int' to 'MyClass *'
- _popen is not a member of std
- 'assert' was not declared in this scope
- base class 'struct QtPrivate::AlignOf_WorkaroundForI386Abi<double>' has a non-virtual destructor
- boost/filesystem.hpp: No such file or directory
- borland.hpp: Only member functions may be 'const' or 'volatile'
- bzconfig.h: Unknown compiler
- cc1plus: internal compiler error: Segmentation fault
- CLK_TCK was not declared in this scope
- 'consoleInitDefault' was not declared in this scope
- 'Container::value_type' is not a type
- 'cout' is not a member of 'std'
- duplicate symbol
- enable_if_does_not_work_on_this_compiler<void>
- 'endl' is not a member of 'std'
- iterator.hpp: Invalid template argument list
- jconfig.h: No such file or directory
- jpeglib.h: No such file or directory
- 'jpeg_read_image' was not declared in this scope
- Multithreaded RTL must be selected
- 'MyPolicy::MyMethod' is not a direct base class of 'MyClass<MyPolicy>'
- No matching function for call to 'ptr_fun'
- Only member functions may be 'const' or 'volatile'
- openssl/conf.h: No such file or directory
- 'operator+' not implemented in type 'std::map<int,double>' for arguments of type 'int'
- QCanvas: No such file or directory
- Request for member 'mX' in 'w', which is of non-class type 'Widget()'
- shared_ptr.hpp: Call to undefined function 'assert'
- shared_ptr.hpp: Cannot convert 'Y *' to 'Widget *'
- Size of @_STL@%vector%78_STL@... is unknown or zero
- stdio.h:430: error: expected initializer before 'throw'
- 'SUB_BG0_CR' was not declared in this scope
- tuple_basic.hpp: Multiple declaration for 'element<N,T>'
- Undefined reference to '[anything]'
- UnicodeQt4.h:197: error: call of overloaded 'toLower(UChar32&)' is ambiguous
- utilities.hpp: Invalid template argument list
- Your compiler and/or configuration is unsupported by this verions of uBLAS
- wchar.h:718: error: expected initializer before 'throw'
How to let compile warnings be treated like compile errors in Qt Creator?
In the project file, add the following line:
QMAKE_CXXFLAGS += -Werror
- Compile cleanly at high warning levels [1,3]
- Prefer compile errors to runtime errors [2,4]
- [1] Herb Sutter, Andrei Alexandrescu. C++ coding standards: 101 rules, guidelines, and best practices. ISBN: 0-32-111358-6. Item 1: 'Compile cleanly at high warning levels'.
- [2] Herb Sutter, Andrei Alexandrescu. C++ coding standards: 101 rules, guidelines, and best practices. ISBN: 0-32-111358-6. Item 14: 'Prefer compile- and link-time errors to run-time errors'.
- [3] Linus Torvalds. Re:[PATCH] Don't compare unsigned variable for <0 in sys_prctl(). 2006-11-28. Retrieved on 2010-09-20. 'Friends don't let friends use [gcc] "-W"'
- [4] C++ Core Guidelines: P.5: Prefer compile-time checking to run-time checking