Skip to content

Latest commit

 

History

History
132 lines (73 loc) · 1.62 KB

CppCompileErrorAssertWasNotDeclaredInThisScope.md

File metadata and controls

132 lines (73 loc) · 1.62 KB

 

 

 

 

 

 

Qt CreatorWindows

 

Compile error.

 

 

 

 

Enviornment

 

Operating system(s):

  • Windows Windows XP

IDE(s):

Project type:

  • console Console application

Compiler(s):

Libraries used:

 

 

 

 

 

Code

 


#include <cassert> int main() {   assert(1!=2); }

 

 

 

 

 

Observations

 

On Windows, the location of cassert.h was 'C:\qt\2010.02.1\mingw\lib\gcc\mingw32\4.4.0\include\c++\cassert.h'. In cassert.h, assert.h was #included, but this file seems absent.

 

On Ubuntu, cassert was located at /usr/include/c++/4.4/cassert.h, assert.h at /usr/include/assert.h. I uploaded it to here and copied it to C:\qt\2010.02.1\mingw\lib\gcc\mingw32\4.4.0\include\c++\assert.h', but this fails.

 

 

 

 

 

Solution