Menu

Why I cann't compile "hello.cpp" example ?

shadow86
2007-11-05
2012-09-26
  • shadow86

    shadow86 - 2007-11-05

    I've install Devc++5 ,but I cann't compile any program which include the header <iostream> .Who can tell me why?

    This is the program:
    #include <iostream>

                        using namespace std;
    
                        int main (int argc, char *argv[])
                         { 
                            char quit;
    
                            quit = '\0';
                            while (quit != 'q')
                             {
                               cout &lt;&lt; &quot;Hello ! This is a console app.&quot; &lt;&lt; endl;
                               cout &lt;&lt; &quot;To create a console, go to Project Options and select&quot; &lt;&lt; endl;
                               cout &lt;&lt; &quot;\'Win32 Console\'.&quot; &lt;&lt; endl;
                               cout &lt;&lt; &quot;Press q to quit &quot; &lt;&lt; endl;
                               cin &gt;&gt; quit;
                              }
    
                            return 0;
                         }
    
               and this is ERROR MESSAGE  :              89 C:\Dev-Cpp\include\cwctype '::iswblank' has not been declared
    
              I've updata the compiler gcc to 4.1.2  .
    
              And my settings :compiler options -&gt; directories -&gt; bin  {  c:\Dev-Cpp\bin
                                                                          c:\Dev-Cpp\libexec\gcc\mingw\4.1.2\ 
                                                                          c:\Dev-Cpp\libexec\gcc\mingw\4.1.2\install-tool
                                                                          c:\Dev-Cpp\mingw\bin
                                                                        }
                                                                  lib      {  c:\Dev-Cpp\lib   }
                                                               C include   {  c:\Dev-Cpp\include}
                                                              cppinclude   {  c:\Dev-Cpp\include
                                                                                c:\Dev-Cpp   }
    
     
    • Osito

      Osito - 2007-11-05

      I don't think you have all the C++ include directories. I upgraded so my paths are no longer the default, but I have:

      C:\mingw\lib\gcc\i686-pc-mingw32\4.2.1-dw2\include
      C:\mingw\include\c++\4.2.1-dw2\backward
      C:\mingw\include\c++\4.2.1-dw2\i686-pc-mingw32
      C:\mingw\include\c++\4.2.1-dw2
      C:\mingw\include

      So you may need to add some additional paths. I remember when I first upgraded I just put in 'C:\mingw\include' and that wasn't enough.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.