Graphlcd - kompilerfehler ..

  • hallo,


    danke erstmal an alle fleisigen helfer auf diesem board. bisher konnte ich durch lesen der beiträge alle probleme lösen. nun wohl nicht mehr.
    beim kompilieren des plugins bekomme ich immerfolgende kompilerfehler:


    auszug:
    linux:/usr/local/vdr # GRAPHLCD_DRIVER=KS0108 make plugins
    make[1]: Entering directory `/usr/local/vdr/PLUGINS/src/graphlcd'
    make[1]: Leaving directory `/usr/local/vdr/PLUGINS/src/graphlcd'
    make[1]: Entering directory `/usr/local/vdr/PLUGINS/src/graphlcd'
    g++ -O2 -Wall -Woverloaded-virtual -c -DPLUGIN_NAME_I18N='"graphlcd"' -DKS0108 -I../../../include -I../../../../DVB/include graphlcd.c
    g++ -O2 -Wall -Woverloaded-virtual -c -DPLUGIN_NAME_I18N='"graphlcd"' -DKS0108 -I../../../include -I../../../../DVB/include display.c
    g++ -O2 -Wall -Woverloaded-virtual -c -DPLUGIN_NAME_I18N='"graphlcd"' -DKS0108 -I../../../include -I../../../../DVB/include graphlib.c
    graphlib.c:31: stray '\' in program
    graphlib.c:32: ANSI C++ forbids declaration `tmp' with no type
    graphlib.c:32: redefinition of `int tmp'
    graphlib.c:31: `int tmp' previously declared here
    graphlib.c:32: `b' was not declared in this scope
    graphlib.c:32: stray '\' in program
    graphlib.c:33: ANSI C++ forbids declaration `b' with no type
    graphlib.c:33: `a' was not declared in this scope
    graphlib.c:33: stray '\' in program
    graphlib.c:34: ANSI C++ forbids declaration `a' with no type
    graphlib.c:34: stray '\' in program
    graphlib.c:35: parse error before `}'
    graphlib.c:40: stray '\' in program
    graphlib.c:41: stray '\' in program
    graphlib.c:42: stray '\' in program
    graphlib.c: In method `bool cGraphLCDLogo::Load(const char *, eLogoSizes)':
    graphlib.c:109: stray '\' in program
    graphlib.c:110: stray '\' in program
    graphlib.c:116: stray '\' in program
    graphlib.c:117: stray '\' in program
    graphlib.c:122: stray '\' in program
    graphlib.c:123: stray '\' in program
    graphlib.c:139: stray '\' in program
    graphlib.c:140: stray '\' in program
    graphlib.c:169: parse error before `else'
    graphlib.c:183: cannot declare member function `cGraphLCDGraphLib::Abs2' within `cGraphLCDLogo'
    graphlib.c:183: parse error before `{'
    graphlib.c:198: cannot declare member function `cGraphLCDGraphLib::Line' within `cGraphLCDLogo'
    graphlib.c:198: parse error before `{'
    graphlib.c:202: `x1' undeclared (first use this function)
    graphlib.c:202: (Each undeclared identifier is reported only once
    graphlib.c:202: for each function it appears in.)
    graphlib.c:202: implicit declaration of function `int GetSizeX(...)'
    graphlib.c:203: `y1' undeclared (first use this function)
    graphlib.c:203: implicit declaration of function `int GetSizeY(...)'
    graphlib.c:204: `x2' undeclared (first use this function)
    graphlib.c:205: `y2' undeclared (first use this function)
    graphlib.c:207: `dx' undeclared (first use this function)
    graphlib.c:208: implicit declaration of function `int Abs2(...)'
    graphlib.c:210: `sx' undeclared (first use this function)
    graphlib.c:215: `dy' undeclared (first use this function)
    graphlib.c:218: `sy' undeclared (first use this function)
    graphlib.c:223: `color' undeclared (first use this function)
    graphlib.c:223: implicit declaration of function `int SetPixel(...)'
    graphlib.c:225: `d' undeclared (first use this function)
    graphlib.c:257: cannot declare member function `cGraphLCDGraphLib::HLine' within `cGraphLCDLogo'
    graphlib.c:257: parse error before `{'
    graphlib.c:262: stray '\' in program
    graphlib.c:264: implicit declaration of function `int Set8Pixels(...)'
    graphlib.c:283: cannot declare member function `cGraphLCDGraphLib::VLine' within `cGraphLCDLogo'
    graphlib.c:283: parse error before `{'
    graphlib.c:286: `x' undeclared (first use this function)
    graphlib.c:290: stray '\' in program
    graphlib.c:304: cannot declare member function `cGraphLCDGraphLib::Rectangle' within `cGraphLCDLogo'
    graphlib.c:304: parse error before `{'
    graphlib.c:312: stray '\' in program
    graphlib.c:313: stray '\' in program
    graphlib.c:315: `filled' undeclared (first use this function)
    graphlib.c:316: implicit declaration of function `int HLine(...)'
    graphlib.c:317: implicit declaration of function `int VLine(...)'
    graphlib.c:331: cannot declare member function `cGraphLCDGraphLib::RoundEdges' within `cGraphLCDLogo'
    graphlib.c:331: parse error before `{'
    graphlib.c:338: break statement not within loop or switch
    graphlib.c:340: case label not within a switch statement
    graphlib.c:340: confused by earlier errors, bailing out
    make[1]: *** [graphlib.o] Error 1
    make[1]: Leaving directory `/usr/local/vdr/PLUGINS/src/graphlcd'
    make[1]: Entering directory `/usr/local/vdr/PLUGINS/src/hello'


    ich vermute mal, dass irgendeine libary fehlt, weil es ja anscheinend bei euch problemlos läuft. mein system ist eine suse 8.0 in der minimalvariante. getestet habe ich vdr1.2.0 und vdr 1.1.33.
    kann mir da bitte einer kurz auf die sprünge helfen?
    cu alan

  • Hi alan,
    ich bin mir zwar nicht sicher warum das so ist, aber Dein Compiler scheint Schwierigkeiten mit den Makros zu haben.
    Du könntest erst einmal versuchen, die Makros in eine Zeile (also ohne '\') zu schreiben:
    Also aus:

    Code
    #define SORT(a,b) if ((b) < (a)) {\
      int tmp;\
      tmp = b;\
      b = a;\
      a = tmp;\
    }


    wird:

    Code
    #define SORT(a,b) if ((b) < (a)) {int tmp; tmp = b; b = a; a = tmp;}


    und aus:

    Code
    #define GETANDCHECK { t=fgetc(InFile);\
                          if(t==EOF) {\
                            fclose(InFile);\
                            return false;\
                          };}


    wird:

    Code
    #define GETANDCHECK { t=fgetc(InFile); if(t==EOF) {fclose(InFile);return false;};}


    Gruß, Carsten

  • Hi alan,

    Zitat

    Original von alan
    danke dir vielmals für die hilfe! er tuts! sauber durchmarschiert.
    und bei der gelegenheit noch danke fürs plugin!


    cu alan


    Danke für die Blumen :D
    Viel Spass noch, Carsten

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!