Problem mit Code::Blocks



  • hallo,

    also mein problem besteht darin das ich mir code blocks jetzt neu drauf gemacht habe und auch ein programm schon geschrieben habe nur irgendwie bekomme ich es nicht hin das neue projekt auszuführen, bei mir ist dieser "pfeil" welcher für "run " steht immer grau unterlegt und ich kann ihn nich drücken... ich habe das programm zwar schon compilieren lassen von codeblocks, es wurden auch keien fehleer gefunden, aber trotzdem kriege ich das programm nicht zum laufen kann mir einer helfen.

    edit:jetzt habe ich ma was neues gemacht und habe mal compiliert und da kommt folgender fehler.

    Execution of 'mingw32-g++.exe -IC:\Dev-Cpp\include -c "C:\Dokumente und Einstellungen\christopher\Desktop\Programme\C++\eigenbox.cpp" -o "C:\Dokumente und Einstellungen\christopher\Desktop\Programme\C++\eigenbox.o"' in 'C:\Programme\CodeBlocks' failed.

    was muss ich da machen damit es geht??



  • Aehnliche Probleme,

    Compiling: C:\Data\C\rechneruebung4.c
    In file included from C:/Program Files/CodeBlocks/include/stdio.h:26,
                     from C:\Data\C\rechneruebung4.c:1:
    C:/Program Files/CodeBlocks/include/stddef.h:6:24: no include path in which to search for stddef.h
    In file included from C:/Program Files/CodeBlocks/include/stdio.h:28,
                     from C:\Data\C\rechneruebung4.c:1:
    C:/Program Files/CodeBlocks/include/stdarg.h:6:24: no include path in which to search for stdarg.h
    In file included from C:\Data\C\rechneruebung4.c:1:
    C:/Program Files/CodeBlocks/include/stdio.h:198: error: syntax error before "size_t"
    C:/Program Files/CodeBlocks/include/stdio.h:209: error: syntax error before "size_t"
    C:/Program Files/CodeBlocks/include/stdio.h:210: error: syntax error before "__gnuc_va_list"
    C:/Program Files/CodeBlocks/include/stdio.h:211: error: syntax error before "__gnuc_va_list"
    C:/Program Files/CodeBlocks/include/stdio.h:212: error: syntax error before "__gnuc_va_list"
    C:/Program Files/CodeBlocks/include/stdio.h:213: error: syntax error before "size_t"
    C:/Program Files/CodeBlocks/include/stdio.h:216: error: syntax error before "size_t"
    C:/Program Files/CodeBlocks/include/stdio.h:216: warning: conflicting types for built-in function 'snprintf'
    C:/Program Files/CodeBlocks/include/stdio.h:218: error: syntax error before "size_t"
    C:/Program Files/CodeBlocks/include/stdio.h: In function `vsnprintf':
    C:/Program Files/CodeBlocks/include/stdio.h:219: error: `s' undeclared (first use in this function)
    C:/Program Files/CodeBlocks/include/stdio.h:219: error: (Each undeclared identifier is reported only once
    C:/Program Files/CodeBlocks/include/stdio.h:219: error: for each function it appears in.)
    C:/Program Files/CodeBlocks/include/stdio.h:219: error: `n' undeclared (first use in this function)
    C:/Program Files/CodeBlocks/include/stdio.h:219: error: `format' undeclared (first use in this function)
    C:/Program Files/CodeBlocks/include/stdio.h:219: error: `arg' undeclared (first use in this function)
    C:/Program Files/CodeBlocks/include/stdio.h: At top level:
    C:/Program Files/CodeBlocks/include/stdio.h:220: error: syntax error before "__gnuc_va_list"
    C:/Program Files/CodeBlocks/include/stdio.h:222: error: syntax error before "__gnuc_va_list"
    C:/Program Files/CodeBlocks/include/stdio.h:224: error: syntax error before "__gnuc_va_list"
    C:/Program Files/CodeBlocks/include/stdio.h:297: warning: `__cdecl__' attribute only applies to function types
    C:/Program Files/CodeBlocks/include/stdio.h:297: error: syntax error before "fread"
    C:/Program Files/CodeBlocks/include/stdio.h:298: warning: `__cdecl__' attribute only applies to function types
    C:/Program Files/CodeBlocks/include/stdio.h:298: error: syntax error before "fwrite"
    In file included from C:/Program Files/CodeBlocks/include/sys/types.h:21,
                     from C:/Program Files/CodeBlocks/include/stdio.h:399,
                     from C:\Data\C\rechneruebung4.c:1:
    C:/Program Files/CodeBlocks/include/stddef.h:6:24: no include path in which to search for stddef.h
    In file included from C:\Data\C\rechneruebung4.c:1:
    C:/Program Files/CodeBlocks/include/stdio.h:428: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:429: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:430: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:431: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:432: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:433: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:434: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:435: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:436: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:437: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:438: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:439: warning: `__cdecl__' attribute only applies to function types
    C:/Program Files/CodeBlocks/include/stdio.h:439: error: syntax error before "fgetwc"
    C:/Program Files/CodeBlocks/include/stdio.h:440: warning: `__cdecl__' attribute only applies to function types
    C:/Program Files/CodeBlocks/include/stdio.h:440: error: syntax error before "fputwc"
    C:/Program Files/CodeBlocks/include/stdio.h:441: warning: `__cdecl__' attribute only applies to function types
    C:/Program Files/CodeBlocks/include/stdio.h:441: error: syntax error before "ungetwc"
    C:/Program Files/CodeBlocks/include/stdio.h:444: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:444: warning: data definition has no type or storage class
    C:/Program Files/CodeBlocks/include/stdio.h:445: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:446: warning: `__cdecl__' attribute only applies to function types
    C:/Program Files/CodeBlocks/include/stdio.h:446: error: syntax error before "getwc"
    C:/Program Files/CodeBlocks/include/stdio.h:447: warning: `__cdecl__' attribute only applies to function types
    C:/Program Files/CodeBlocks/include/stdio.h:447: error: syntax error before "getwchar"
    C:/Program Files/CodeBlocks/include/stdio.h:448: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:448: warning: data definition has no type or storage class
    C:/Program Files/CodeBlocks/include/stdio.h:449: warning: `__cdecl__' attribute only applies to function types
    C:/Program Files/CodeBlocks/include/stdio.h:449: error: syntax error before "putwc"
    C:/Program Files/CodeBlocks/include/stdio.h:450: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:451: warning: `__cdecl__' attribute only applies to function types
    C:/Program Files/CodeBlocks/include/stdio.h:451: error: syntax error before "putwchar"
    C:/Program Files/CodeBlocks/include/stdio.h:452: error: syntax error before "wchar_t"
    C:/Program Files/CodeBlocks/include/stdio.h:453: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:454: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:455: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:456: error: syntax error before '*' token
    C:/Program Files/CodeBlocks/include/stdio.h:456: error: syntax error before '*' token
    Process terminated with status 1 (0 minutes, 1 seconds)
    52 errors, 12 warnings
    

    usw usf..



  • @Firefighter:

    Es gibt Code::Blocks mit und ohne Compiler.
    Hast Du vielleicht das kleinere Paket installiert und deshal keinen Compiler? 🙂
    Sieht zumindest so aus.

    @rine:

    Zwar ist nicht ersichtlich was Dein Problem mit dem OP zu tun hat da es sich um ganz andere Fehlermeldungen handelt, aber anyway:

    Es sieht so aus als würdest Du C++ Code mit einem C-Compiler übersetzen.
    Benenn mal die Datei in rechneruebung4.cpp um und versuch's nochmal.

    Sonst poste mal den Code wenn er nicht zu lang ist....

    Grüsse

    *this



  • Der Code sollte richtig sein. Hatte ihn auf meinem notebook geschrieben und da war noch ne alte Installation von Dev-Cpp drauf.
    Auf meinem Rechner zuhause war kein Compiler also hab ich code blocks installiert. Aber hier mal der Code:

    #include <stdio.h>
    #include <stdlib.h>
    
    int main(int argc, char* argv[])
    {
      if(argc == 4)
      {
        int operand1, operand2;
        char operator;
        operand1 = atoi(argv[1]);
        operand2 = atoi(argv[3]);
        operator = *argv[2];
        switch(operator)
        {
          case('+'):
          {
            printf("Berechne: %d %c %d = %d\n", operand1, operator, operand2, operand1 + operand2);
          } break;
          case('-'):
          {
            printf("Berechne: %d %c %d = %d\n", operand1, operator, operand2, operand1 - operand2);
          } break;
          case('*'):
          {
            printf("Berechne: %d %c %d = %d\n", operand1, operator, operand2, operand1 * operand2);
          } break;
          case('/'):
          {
            if(operand2 != 0)
            {
              printf("Berechne: %d %c %d = %f\n", operand1, operator, operand2, (float)operand1 / operand2);
            }
            else
            {
              printf("Divison durch 0 nicht moeglich!\n");
            }
          } break;
        }
      }
      else
      {
        printf("Eingabefehler!");
      }
      return 0;
    }
    


  • @rine :
    Soweit ich das sehe ist das wirklich reines "C"
    Aber benenn die Datei trotzdem mal zu *.cpp um; vielleicht sind die Include-Pfade für den "C"-Compiler falsch gesetzt; für C++ hingegen korrekt.

    Das soll nicht so bleiben; ich will's nur diagnostizieren.

    Btw bist Du denn sicher dass Du mingw mitinstaliert hast? Es gibt wie geasgt zwei Pakete für Code::Blocks Win - eines mit, eins ohne Compiler... 😃

    Grüsse

    *this



  • Umbenennung in *.cpp ändert nichts.
    http://prdownloads.sourceforge.net/codeblocks/codeblocks-1.0rc2_mingw.exe?download
    Das ist die Installationsdatei, also mit mingw.
    Frage mich auch, warum hier soviel grau unterlegt ist:
    http://666kb.com/i/aosviza3oxv228lzf.jpg
    Bei den Compilersettings in codeblocks sieht alles ziemlich leer aus, ich kann allerdings auch nicht behaupten, dass ich Ahnung davon hätte. Hier noch ein paar screens:
    http://666kb.com/i/aosvohdoiwmeoemvf.jpg
    Mein OS ist übrigens vista.



  • leute ich habe immernoch das selbe problem hier mal die fehler... anscheint findet er die includes nicht...aber wie kann ich ihm sagen das er sie findet

    C:\Programme\CodeBlocks\test2.c:1: iostream: No such file or directory
    C:\Programme\CodeBlocks\test2.c:3: error: syntax error before "namespace"
    C:\Programme\CodeBlocks\test2.c:3: warning: data definition has no type or storage class
    C:\Programme\CodeBlocks\test2.c:7: error: cout' undeclared (first use in this function) C:\\Programme\\CodeBlocks\\test2.c:7: error: (Each undeclared identifier is reported only once C:\\Programme\\CodeBlocks\\test2.c:7: error: for each function it appears in.) C:\\Programme\\CodeBlocks\\test2.c:7: error:endl' undeclared (first use in this function)
    :: === Build finished: 6 errors, 1 warnings ===



  • Firefighter schrieb:

    leute ich habe immernoch das selbe problem hier mal die fehler... anscheint findet er die includes nicht...aber wie kann ich ihm sagen das er sie findet

    C:\Programme\CodeBlocks\test2.c:1: iostream: No such file or directory
    C:\Programme\CodeBlocks\test2.c:3: error: syntax error before "namespace"
    C:\Programme\CodeBlocks\test2.c:3: warning: data definition has no type or storage class
    C:\Programme\CodeBlocks\test2.c:7: error: cout' undeclared (first use in this function) C:\\Programme\\CodeBlocks\\test2.c:7: error: (Each undeclared identifier is reported only once C:\\Programme\\CodeBlocks\\test2.c:7: error: for each function it appears in.) C:\\Programme\\CodeBlocks\\test2.c:7: error:endl' undeclared (first use in this function)
    :: === Build finished: 6 errors, 1 warnings ===

    Er versucht als C-Code zu compilieren, aber das ist C++. Kann man glaub ich beim Projekt erstellen einstellen.



  • rine schrieb:

    Frage mich auch, warum hier soviel grau unterlegt ist:
    http://666kb.com/i/aosviza3oxv228lzf.jpg

    Du hast kein Projekt auf, da weiß er auch nicht wie er compilieren soll.


Anmelden zum Antworten